Broken Quoting button in QA Answer editor
Site Bugs / Suggestions
1
Posts
1
Posters
0
Views
1
Watching
-
The Javascript that generates the "Quote Selected Text" button in the QA Answer editor has some issues with quoting. The generated button displays with the text:
');" class="button"> Quote Selected Text
The generated HTML is this (as displayed! I had to change the actual quoting so it would display here as the actual HTML):
<button onclick="return QuoteText('<ASP:Literal ID=" quotebuttonname"="" runat="server">');" class="button"> Quote Selected Text </button>
The nested " in the onclick seems to be the issue. The Javascript is:
<script type="text/javascript"> if (document.all||window.getSelection) { var quoteButtonName = "%3CASP:Literal ID=\\"QuoteButtonName\\" runat=\\"server\\" /%3E"; document.write(unescape("%3Cbutton%20onclick%3D%22return%20QuoteText%28%27")); document.write(unescape(quoteButtonName)); document.write(unescape("%27%29%3B%22%20class%3D%22button%22%3E%20%20Quote%20Selected%20Text")); document.write(unescape("%20%20%3C/button%3E")); } </script>
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed." - G.K. Chesterton