Dotclear


Ignore:
Timestamp:
04/27/15 13:01:58 (10 years ago)
Author:
Nicolas <nikrou77@…>
Branch:
2.7
source:
c253e82bd552066a2bb58e5891f16313665ee4f3
Message:

Fix #2062 - quotes were not encoded in attributes

Location:
plugins/dcCKEditor/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • plugins/dcCKEditor/js/popup_link.js

    r2868 r3000  
    2424               link.setAttribute('href', insert_form.elements.href.value); 
    2525               if (insert_form.elements.title.value!='') { 
    26                     link.setAttribute('title', insert_form.elements.title.value); 
     26                    link.setAttribute( 
     27                         'title', 
     28                         window.opener.CKEDITOR.tools.htmlEncodeAttr(insert_form.elements.title.value) 
     29                    ); 
    2730               } 
    2831               if (insert_form.elements.hreflang.value!='') { 
    29                     link.setAttribute('hreflang', insert_form.elements.hreflang.value); 
     32                    link.setAttribute( 
     33                         'hreflang', 
     34                         window.opener.CKEDITOR.tools.htmlEncodeAttr(insert_form.elements.hreflang.value) 
     35                    ); 
    3036               } 
    3137               if (editor.getSelection().getSelectedElement()!=null) { 
  • plugins/dcCKEditor/js/popup_media.js

    r2754 r3000  
    2525                    img += window.opener.$.stripBaseURL($('input[name="src"]:checked',insert_form).val())+'"'; 
    2626                    var img_title = $('input[name="description"]',insert_form).val(); 
    27                     img_title 
    28                          .replace('&','&amp;').replace('>','&gt;') 
    29                          .replace('<','&lt;').replace('"','&quot;'); 
     27                    img_title = window.opener.CKEDITOR.tools.htmlEncodeAttr(img_title); 
    3028                    img += ' title="'+img_title+'"'; 
    3129                    var align = $('input[name="alignment"]:checked',insert_form).val(); 
     
    3533 
    3634                    var title = $('input[name="title"]',insert_form).val(); 
    37                     img += ' alt="'+title+'"/>'; 
     35                    img += ' alt="'+window.opener.CKEDITOR.tools.htmlEncodeAttr(title)+'"/>'; 
    3836 
    3937                    var element; 
     
    5351               var link = '<a href="'; 
    5452               link += window.opener.$.stripBaseURL($('input[name="url"]',insert_form).val()); 
    55                link += '">'+insert_form.elements.title.value+'</a>'; 
     53               link += '">'+window.opener.CKEDITOR.tools.htmlEncodeAttr(insert_form.elements.title.value)+'</a>'; 
    5654               element = window.opener.CKEDITOR.dom.element.createFromHtml(link); 
    5755 
Note: See TracChangeset for help on using the changeset viewer.

Sites map