GithubHelp home page GithubHelp logo

Comments (6)

Cogito avatar Cogito commented on May 28, 2024

It's worth noting that the situation I am running into occurs when something like google.com" is escaped to google.com"

This is then turned into google.com";

Note the trailing semicolon

from autolinker.js.

warrenrumak avatar warrenrumak commented on May 28, 2024

+1
I ran into this same issue yesterday, except with " around the URL instead of "

from autolinker.js.

gregjacobs avatar gregjacobs commented on May 28, 2024

Thanks for the report, will look into it

from autolinker.js.

warrenrumak avatar warrenrumak commented on May 28, 2024

Quick failing test I whipped up....

        it( "should handle a URL inside an HTML-encoded anchor tag", function() {
            var html = "Joe learned about anchor tags on the <a href="http://www.w3schools.com/aaa">W3SCHOOLS</a> site ...";
            var tobe = "Joe learned about anchor tags on the &lt;a href=&quot;<a href=\"http://www.w3schools.com/aaa\">w3schools.com</a>&quot;&gt;W3SCHOOLS&lt;/a&gt; site ...";

            var result = autolinker.link( html );
            expect( result ).toBe( tobe );
        });

from autolinker.js.

nilscc avatar nilscc commented on May 28, 2024

+1

Could possibly be solved by adding &quot; to the htmlCharacterEntitiesRegex ? I did this as a temporary workaround and it seems to work:

        var autolinker = new Autolinker();
        autolinker.htmlCharacterEntitiesRegex = /(&nbsp;|&#160;|&lt;|&#60;|&gt;|&#62;|&quot;|&#34;|&#39;)/gi;

This adds the regex for both " and '.

from autolinker.js.

gregjacobs avatar gregjacobs commented on May 28, 2024

Fixed in 0.15.2

from autolinker.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.