Opened 11 years ago
Closed 11 years ago
#11250 closed Bug (fixed)
Quotes don't get converted to HTML entities inside <textarea>
Reported by: | sir qwerty | Owned by: | Marek Lewandowski |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.3.1 |
Component: | Core : Output Data | Version: | 4.3 |
Keywords: | Cc: |
Description
Quotes (both single and double) get converted to HTML entities correctly when typed inside block elements such as DIV, P, BLOCKQUOTE, CODE and so on.
<p>'a'<p> is converted to <p>'a'</p>
Unfortunatelly they are ignored when typed inside TEXTAREA element:
<p><textarea>'a'</textarea></p> stays untouched. Obviously this breaks up my later executed SQL statements. Ampersands get converted OK.
Securing the quotes during PHP process would be a workaround, but till now I've always relied on this CKeditor's function.
ACF is turned off (config.allowedContent = true;) everything else regarding entities is set to default values. Worked fine in V4, maybe got broken with deeper ACF implementation.
Windows browsers: IE 11, Chrome 31, FF 25.
Change History (8)
comment:1 Changed 11 years ago by
Keywords: | quotes entities textarea removed |
---|---|
Status: | new → confirmed |
comment:2 Changed 11 years ago by
Owner: | set to Marek Lewandowski |
---|---|
Status: | confirmed → assigned |
comment:3 Changed 11 years ago by
Status: | assigned → review |
---|
Pushed to t/11250 at dev and tests.
I was thinking about adding tests for these entities to test process textarea
in htmldataprocessor.html
with following code:
assert.areSame( os + '"' + oe, toHtml( ss + '"' + se ), 'textarea processing did not convert double quote to entity' ); assert.areSame( ss + ''' + se, toHtml( ss + '\'' + se ), 'textarea processing did not convert single quote to entity' );
But function toHtml() seems not to use all the goodies which editor#setData does. I ended up with adding them to separate TCs.
comment:4 Changed 11 years ago by
Milestone: | → CKEditor 4.3.1 |
---|
comment:5 Changed 11 years ago by
Status: | review → review_failed |
---|
Test should be added to dt/plugins/entities, since they test that plugin.
comment:7 Changed 11 years ago by
Status: | review → review_passed |
---|
Pushed one additional commit to tests.
comment:8 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed on master with git:213d91c on dev and de69747 on tests.
I was able to reproduce this from CKEditor 4.3 in every browser.