Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. Site Bugs / Suggestions
  4. Broken Quoting button in QA Answer editor

Broken Quoting button in QA Answer editor

Scheduled Pinned Locked Moved Site Bugs / Suggestions
javascripthtmlsysadminbeta-testingtools
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Matt T Heffron
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups