Opened 7 years ago

Closed 7 years ago

Last modified 4 years ago

#9282 closed Bug (invalid)

src url encoding - ampersands should not be encoded in img and iframe src

Reported by: franzo Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

This happens for both img and iframe tags.

Steps to reproduce:

  1. Click Source
  1. Paste in img or iframe code like this:
    <iframe src="https://foo.bar?test1=1&test2=2">...</iframe>
    <img src="https://foo.bar?test1=1&test2=2" />
    
  1. Click Source again
  1. Click Source again, and now you will see:
    <iframe src="https://foo.bar?test1=1&amp;test2=2">...</iframe>
    <img src="https://foo.bar?test1=1&amp;test2=2" />
    

See that the ampersands have been encoded, which breaks the urls.

Reproduced in 3.6.4 and 4.0 beta using Chrome and Firefox.

Change History (2)

comment:1 Changed 7 years ago by Jakub Ś

Keywords: src encode url ampersand removed
Resolution: invalid
Status: newclosed
Version: 3.6.4

Ampersand character is a special case which must always be encoded.

You may disable this encoding with below configuration option http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.forceSimpleAmpersand but you should not do it as &amp; does not break URL.

If you enter working link and CKEditor will change & to &amp; turn on the preview mode and click on a link. It will work.

Please also refer to http://www.w3.org/TR/xhtml1/#C_12.

comment:2 Changed 4 years ago by Jakub Ś

#13905 was marked as duplicate.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy