Skip to content

readable_html doesn't properly escape text strings #62

Description

@vkryukov

For example, the following excerpt from test case 001

"<blockquote><p>Drinking game for web devs:<br/>(1) Think of a noun<br/>(2) Google &quot;&lt;noun&gt;.js&quot;<br/>(3) If a library with that name exists - drink</p>— Shay Friedman (@ironshay) <a href=\"https://twitter.com/ironshay/statuses/370525864523743232\">August 22, 2013</a></blockquote>" 
|> Readability.article 
|> Readability.readable_html

returns

"<div><div><p>Drinking game for web devs:<br/>(1) Think of a noun<br/>(2) Google \"<noun>.js\"<br/>(3) If a library with that name exists - drink</p>— Shay Friedman (@ironshay) <a href=\"https://twitter.com/ironshay/statuses/370525864523743232\">August 22, 2013</a></div></div>"

Notice the angle brackets around noun and not HTML escaped.

This also causes a problem with HTML code fragment down on the page.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions