From fa6b576db4373e199e86dd8543eba1fd58d81368 Mon Sep 17 00:00:00 2001 From: "cmanske%netscape.com" Date: Thu, 11 Jan 2001 04:59:19 +0000 Subject: [PATCH] Fix bugs 55286 (foreign char in URL not converted correctly), 62386 (enable OK after selecting anchor) r=mjudge, sr=sfraser --- editor/ui/dialogs/content/EdLinkProps.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/editor/ui/dialogs/content/EdLinkProps.js b/editor/ui/dialogs/content/EdLinkProps.js index 0df89694b436..3577728e9dd7 100644 --- a/editor/ui/dialogs/content/EdLinkProps.js +++ b/editor/ui/dialogs/content/EdLinkProps.js @@ -228,7 +228,9 @@ function Startup() // by AdvancedEdit(), which is shared by all property dialogs function InitDialog() { - dialog.hrefInput.value = globalElement.href; + // Must use getAttribute, not "globalElement.href", + // or foreign chars aren't coverted correctly! + dialog.hrefInput.value = globalElement.getAttribute("href"); } function chooseFile() @@ -351,7 +353,10 @@ function SelectNamedAnchor() if (canChangeAnchorSelected) { if (haveNamedAnchors) + { dialog.hrefInput.value = "#"+GetSelectedTreelistValue(dialog.NamedAnchorList); + ChangeText(); + } else UnselectNamedAnchor(); @@ -364,7 +369,10 @@ function SelectHeading() if (canChangeHeadingSelected) { if (haveHeadings) + { dialog.hrefInput.value = "#"+GetSelectedTreelistValue(dialog.HeadingsList); + ChangeText(); + } else UnselectHeadings();