Re: DOM Bug?
- From: Jeff North <jnorthau@xxxxxxxxxxxx>
- Date: Sat, 19 Apr 2008 02:43:29 GMT
On Fri, 18 Apr 2008 16:37:16 GMT, in alt.php "motion musso: aka
sathia" <sathia.musso@xxxxxxxxx>
<074Oj.292512$%k.403029@xxxxxxxxxxxxxxxxxx> wrote:
| Hello
|
| Reproduce code:
| ---------------
| Html:
| this textarea has inside it a reference to an external image
| [...]
| <textarea><img src="foobar" /></textarea>
| [...]
|
|
| Php:
|
| $documentx = new DOMDocument();
| $documentx->loadHTML($data);
| $textareas = $documentx->getElementsByTagName("textarea");
| foreach($textareas AS $textarea){
| print($textarea->getAttribute("value"));
| print($textarea->textContent);
| }
|
| I know there's no "value" attribute in the textarea, but if the content of
| said textarea is wrapped in < and > there's no way to read it.
|
| ideas?
I'd look at the library that you are using and checking what
'textContent' is looking at and it's return value.
AFAIK, textarea contents can be accessed by
value or childNodes[0].nodeValue
-- -------------------------------------------------------------
jnorthau@xxxxxxxxxxxxxxxxxxxxx : Remove your pants to reply
-- -------------------------------------------------------------
.
- References:
- DOM Bug?
- From: motion musso: aka sathia
- DOM Bug?
- Prev by Date: Re: DOM Bug?
- Next by Date: PHPmailer
- Previous by thread: Re: DOM Bug?
- Next by thread: PHPmailer
- Index(es):
Relevant Pages
|