Skip to content
Merged
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
Added a note to the dom-crawler docs about character sets
  • Loading branch information
deanc committed Apr 25, 2013
commit 0ac02e6fe1043311e4c78e7c3d937778eb512d6d
6 changes: 6 additions & 0 deletions components/dom_crawler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@ The crawler supports multiple ways of adding the content::
$crawler->add('<html><body /></html>');
$crawler->add('<root><node /></root>');

.. note::
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 a .. caution:: directive is better


When dealing with other character sets than ISO-8859-1, always add HTML content
using the addHTMLContent method where you can specify the second parameter
Copy link
Member

Choose a reason for hiding this comment

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

you should put addHTMLContent in a literal (double backticks)

to be your target character set.

As the Crawler's implementation is based on the DOM extension, it is also able
to interact with native :phpclass:`DOMDocument`, :phpclass:`DOMNodeList`
and :phpclass:`DOMNode` objects:
Expand Down