diff --git a/core/SSViewer.php b/core/SSViewer.php index c8534a417..9802e8037 100644 --- a/core/SSViewer.php +++ b/core/SSViewer.php @@ -202,6 +202,13 @@ class SSViewer extends Object { SSViewer::$topLevel = null; if(isset($_GET['debug_profile'])) Profiler::unmark("SSViewer::process", " for $template"); + + + // If we have our crazy base tag, then fix # links referencing the current page. + if(strpos($output, '+]href *= *")#/i', '\\1' . $thisURLRelativeToBase . '#', $output); + } return $output; } diff --git a/forms/HtmlEditorField.php b/forms/HtmlEditorField.php index 13597d4ca..9e9db7760 100755 --- a/forms/HtmlEditorField.php +++ b/forms/HtmlEditorField.php @@ -360,6 +360,7 @@ class HtmlEditorField_Toolbar extends ViewableData { array( "internal" => _t('HtmlEditorField.LINKINTERNAL',"Page on the site"), "external" => _t('HtmlEditorField.LINKEXTERNAL',"Another website"), + "anchor" => _t('HtmlEditorField.LINKANCHOR',"Anchor on this page"), "email" => _t('HtmlEditorField.LINKEMAIL', "Email address"), "file" => _t('HtmlEditorField.LINKFILE', "Download a file"), ) @@ -368,6 +369,7 @@ class HtmlEditorField_Toolbar extends ViewableData { new TextField("external", _t('HtmlEditorField.URL', "URL"), 'http://'), new EmailField("email", _t('HtmlEditorField.EMAIL', "Email address")), new TreeDropdownField("file",_t('HtmlEditorField.FILE', "File"),"File", "Filename"), + new TextField("Anchor", _t('HtmlEditorField.ANCHORVALUE', "Anchor")), new TextField("Description", _t('HtmlEditorField.LINKDESCR', "Link description")), new CheckboxField("TargetBlank", _t('HtmlEditorField.LINKOPENNEWWIN', "Open link in a new window?")) ),