Skip to content

[DomCrawler] Warn users of older PHP versions Crawler might not decde html entities properly #5248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions components/dom_crawler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ and :phpclass:`DOMNode` objects:
$html = $crawler->html();

The ``html`` method is new in Symfony 2.3.
In PHP < 5.3.6 it might return html entities which are not properly decoded.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should put this in a caution directive (and we should reword this a bit):

.. caution::

    Due to an issue in PHP, the ``html()`` method returns wrongly decoded HTML
    entities in PHP versions lower than 5.3.6 (for example, it returns ```` instead
    of ``&bull;``).

@jakzal Do you know if that issue affects all HTML entities or only a subset?


Links
~~~~~
Expand Down