Giter Club home page Giter Club logo

Comments (5)

soundasleep avatar soundasleep commented on August 30, 2024

There are a number of invalid HTML entities on that page, e.g. unescaped &s in the <a href>s (they should be escaped as &amp;). Since they're just warnings I think the best approach is to turn off warnings rather than change Html2text itself.

Check HTML5 validity: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.independent.ie%2F&charset=%28detect+automatically%29&doctype=Inline&group=0

from html2text.

feelsickened avatar feelsickened commented on August 30, 2024

It's still working on many of the pages while the errors are turned off & have to agree with you.
Thanks. 👍

from html2text.

randycoder avatar randycoder commented on August 30, 2024

How about HTML5 elements like "nav" and "section"? Is there a way to avoid "invalid in Entity" errors for those tags using DOMDocument::loadHTML()? The issue is closed but the solution is not clear.

from html2text.

eazrael avatar eazrael commented on August 30, 2024

Just ran into this, too. My workaround is using HTMLPurifier + HTML5Purifier and remove the html5 tags before using html2text. Unfortunately HTMLPurifier is dead slow.

from html2text.

eazrael avatar eazrael commented on August 30, 2024

And for reference:
https://bugs.php.net/bug.php?id=60021 -> https://bugzilla.gnome.org/show_bug.cgi?id=761534

from html2text.

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.