Opened 9 years ago

Closed 9 years ago

#13233 closed Bug (fixed)

HTMLDataProcessor cannot process foo:href attributes

Reported by: Piotrek Koszuliński Owned by: Piotrek Koszuliński
Priority: Normal Milestone: CKEditor 4.4.8
Component: General Version:
Keywords: Cc:


Try loading the following source into editor with ACF disabled:

    <svg preserveaspectratio="xMinYMin meet" version="1.1" viewbox="0 0 778 873" xmlns="" xmlns:xlink=""> 
    <image height="100%" width="100%" xlink:href="map.png"></image> 
        <g class="hover_group" opacity="1"> 
            <a xlink:href="">
                <rect fill="red" height="100" opacity="0.0" width="160" x="110" y="240"></rect> 

The xlink:href attribute will be broken.

It seems that this regexp is a problem:

It allows only hyphens in attributes while colons should be accepted as well:

protectAttributeRegex = /([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,

With this regexp the xlink:href attribute is correctly preserved.

Change History (5)

comment:1 Changed 9 years ago by Piotrek Koszuliński

Status: newconfirmed

comment:3 Changed 9 years ago by Piotrek Koszuliński

Owner: set to Piotrek Koszuliński
Status: confirmedassigned

comment:4 Changed 9 years ago by Piotrek Koszuliński

Status: assignedreview

comment:5 Changed 9 years ago by Artur Delura

Resolution: fixed
Status: reviewclosed

Merged with commit.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy