Re: DOM Bug?
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Fri, 18 Apr 2008 17:57:44 -0400
motion musso: aka sathia 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 haven't tried this particular one, but is it maybe considered a child node of the textarea?
I'm just not sure if this is valid xml or not - don't know if you can have an img within a textarea.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.
- Follow-Ups:
- Re: DOM Bug?
- From: motion musso: aka sathia
- Re: DOM Bug?
- References:
- DOM Bug?
- From: motion musso: aka sathia
- DOM Bug?
- Prev by Date: Re: DOM Bug?
- Next by Date: Re: DOM Bug?
- Previous by thread: Re: DOM Bug?
- Next by thread: Re: DOM Bug?
- Index(es):
Relevant Pages
|