Re: DOMDocument -> loadHTML() cuts off html input

From: Date: Wed, 08 Aug 2007 07:10:57 +0000
Subject: Re: DOMDocument -> loadHTML() cuts off html input
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-260428@lists.php.net to get a copy of this message
Hey Richard, It's a list of organisation names. A lot of them have nifty characters such as é ç ' etc. When I escape these character to their corresponding html entities, their encoded value seem to get lost when loaded into a DOMDocument, i.e. they just turn up as non-html entities. I'm pretty sure those characters are the problem though. I first fixed it by dropping the DOMDocument approach and have now adapted them as an AJAX Suggest list, for the very reason you mention. 330 options is way too much. Web 2.0, here we come. Greetz, boro Richard Lynch schreef:
Are there any funky characters or unusual attributes/values in the 31st option -- the one right after the last one that "works"? I'm reasonably certain there is no limitation anywhere near "30" in any RFC for the number of options in a SELECT list. Though 330 is a lot for a normal user who has NO CLUE how to use the keyboard to navigate quickly within the list... On Wed, August 1, 2007 3:54 am, Stijn Verholen wrote:
Hey List, In my application, I am loading html content into a DOMDocument using loadHTML(). The DOMDocument is validated, then the element with a certain ID tag is extracted and loaded into a node in the main DOMDocument, which is then presented as html with saveHTML(). This works fine and has worked fine for relatively large pages (containing several <select> lists with up to 400 options in total). The problem I am now facing is a page with a single, relatively large <select> list, i.e. some 330 options. The html is generated as expected. However when I load it into a DOMDocument and saveHTML(), the select list is cut off to about 30 options. The remainder of the html content dissappears and instead, the remaining open tags are closed, presumably by DOMDocument's saveHTML() method. Any ideas as to why this behaviour is occurring and how to fix it ? Further information available if needed. Thanks in advance, Stijn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
    
-- metastable Stijn Verholen Camille Huysmanslaan 114, bus 2 B-2020 ANTWERPEN +32 (0)3 707 08 08 +32 (0)473 47 62 88 info@metastable.be http://www.metastable.be BTW-BE 0873.645.643 bankrek.nr. ING 363-0106543-77

« previous php.general (#260428) next »