Opened 10 years ago

Closed 10 years ago

#891 closed defect (fixed)

Toggling view improperly converts characters

Reported by: guest Owned by: gogo
Priority: normal Milestone:
Component: Plugin_FullPage Version:
Severity: normal Keywords:
Cc: laredotornado@…

Description

Hi,

I just downloaded the most recent build. I then deployed a single editor on a web page, using settings exactly like the testbed page -- http://xinha.gogo.co.nz/xinha-nightly/examples/testbed.html. I then toggled to the code view, and pasted this code

<script language="JavaScript?"
src="http://www.blinkbits.com/feed/feed2js.php?src=http%3A%2F%2Fwww.greenpeace.org%2Frss%2Finternational%2Fnews&num=5&targ=&utf=y"
type="text/javascript"></script>
<noscript>
<a href="http://www.blinkbits.com/feed/feed2js.php?src=http%3A%2F%2Fwww.greenpeace.org%2Frss%2Finternational%2Fnews&num=5&targ=&utf=y&html=y">View
RSS feed</a>
</noscript>

However, when I toggled to the normal view and then back to the code view, the HTML in my "noscript" tags had been converted to printed characters. This was the result ...

<script type="text/javascript" src="http://www.blinkbits.com/feed/feed2js.php?src=http%3A%2F%2Fwww.greenpeace.org%2Frss%2Finternational%2Fnews&amp;num=5&amp;targ=&amp;utf=y" language="JavaScript?"></script>
<noscript>
&lt;a href=&quot;http://www.blinkbits.com/feed/feed2js.php?src=http%3A%2F%2Fwww.greenpeace.org%2Frss%2Finternational%2Fnews&amp;num=5&amp;targ=&amp;utf=y&amp;html=y&quot;&gt;View
RSS feed&lt;/a&gt;
</noscript>

Thanks for any help, - Dave

Change History (2)

comment:1 Changed 10 years ago by gocher

htmlarea.js - HTMLArea.getHTMLWrapper:
replace

    case 3: // Node.TEXT_NODE
    html = /^script|style$/i.test(root.parentNode.tagName) ? root.data : HTMLArea.htmlEncode(root.data);

with

    case 3: // Node.TEXT_NODE
    html = /^script|^noscript|style$/i.test(root.parentNode.tagName) ? root.data : HTMLArea.htmlEncode(root.data);

with plugin GetHtml there is no mistake

comment:2 Changed 10 years ago by gogo

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.