When editing html with fck editor single quotes inside a javascript href is being converted to ’
For example:
Gets converted into:
It happens when the editor reads the content in.
Anyway to prevent this?
For example:
<p>Hello World test fck</p> <p><a href="javascript:alert('Hello');">Click here to link</a></p>
Gets converted into:
<p>Hello World test fck</p> <p><a href="javascript:alert(’Hello’);">Click here to link</a></p>
It happens when the editor reads the content in.
Anyway to prevent this?
Re: href converting single quotes to &rsquo;
I am using the java FckEditor api. When the html to be editted is saved in the html file that displays the editor, the content has been changed.
Looking at the FckEditor.java class I see an Html encoder as listed below:
The problem I think is the last replace which is converting single quotes into a right quote entity.
Any suggestions on how to get around this?
Re: href converting single quotes to &rsquo;
This seems to work.
Was there a reason why the single quote was be converted to a right single quote instead of '?
Does the fck editor rely on this conversion?