Opened 8 years ago
Closed 8 years ago
#16711 closed Bug (invalid)
Ckeditor changes attribute (and creates new attribute) when an attribute contains " ... occurs on load
Reported by: | Fred Lovine | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: |
Description
Steps to reproduce
- Load the following html in ckeditor: <p><img alt="abc "xyz" /></p>
- View in source mode
Here is a test page: <!doctype html> <html lang="en"> <head>
<script type="text/javascript" src="/ckeditor/ckeditor.js"></script> <script type="text/javascript" language="javascript">
window.onload = function() {
CKEDITOR.config.allowedContent = true; CKEDITOR.replace( 'contentId', { });
};
</script>
</head> <body>
<textarea name="content" id="contentId"><p><img alt="abc "xyz" /></p>
</body> </html>
Expected result
<p><img alt="abc "xyz" /></p>
Actual result
<p><img alt="abc " xyz="" /></p>
Other details (browser, OS, CKEditor version, installed plugins)
Tested in Chrome and Edge. Occurs in version 4.5.9 and 4.6.0.
Change History (2)
comment:1 Changed 8 years ago by
comment:2 Changed 8 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Version: | 4.6.0 |
Please try creating image through image dialog and entering alt text there. The abc "xyz
will be converted to abc &quot;xyz
.
Please have a look at e.g. ckeditor/samples/old/replacebycode.html. This sample just like any other has initial HTML ecnoded. It is obvious that if you were to insert such content yourself you would encode the " as well so that it is rendered as " and not treated as closing quote for alt attribute. You would want to have " text &quot; text "
instead of " text " text "
I'm sorry but I can't accept this ticket as you should rather encode your HTML before inserting it into editor.
Oops, forgot </textarea> ... use this test page:
<!doctype html> <html lang="en"> <head>
</head> <body>
</body> </html>