Skip to content

finds a url inside a base64 encoded image string #117

@ralyodio

Description

@ralyodio

I don't know if this is intended or not, but its causing problems for me.

a base64 encoded image data url is being recognized as a url, so there ends up being a n anchor tag wrapped inside the src attribute of the image when using

If my text contains something like this:

<img src="data:image/png;base64,iVBORw0K...">

Using this method

         text = URI.withinString(text, function(url) {
                return '<a href="'+url+'" class="ext">'+url+'</a>
         });

I end up with this:

<img src="<a href="data:image/png;base64,iVBORw0K...">data:image/png;base64,iVBORw0K...</a>">

...which obviously is invalid html.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions