Re: Bug #1125: Empty tag like <br /> is not possible
| From: | Guillaume Lecanu | Date: | Sun, 04 Apr 2004 01:14:04 +0000 |
| Subject: | Re: Bug #1125: Empty tag like <br /> is not possible | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-27008@lists.php.net to get a copy of this message | ||
The patch.
Le sam 03/04/2004 à 23:57, PHP Bug Database a écrit :
> From: guillaume dot lecanu at online dot fr
> Operating system: Debian Sid
> PHP version: 4.3.4
> PHP Bug Type: XML_Tree
> Bug description: Empty tag like <br /> is not possible
>
> Description:
> ------------
> You cannot make empty tags like <br /> or <img />
> The output return this : <br></br>
>
> I have sent a mail on the ML for fix it.
>
> Reproduce code:
> ---------------
> // From the test.php example, i have add 2 lines for make an // "empty
> tag" 'br' and a standard tag 'span' with a empty value
>
> $tree = new XML_Tree;
> $root = $tree->addRoot('MyFriends');
> $foo = $root->addChild('name', 'Foo');
> $foo = $root->addChild('br');
> $foo = $root->addChild('span', '');
> $bar = $root->addChild('name', 'Bar', array('age' => 21));
> $tree->dump();
>
>
> Expected result:
> ----------------
> <MyFriends>
> <name>Foo</name>
> <br></br>
> <span></span>
> <name age="21">Bar</name>
> </MyFriends>
>
> But the good result must be :
> <MyFriends>
> <name>Foo</name>
> <br />
> <span></span>
> <name age="21">Bar</name>
> </MyFriends>
>
Attachment: [text/x-patch] Node.fix-empyTags.diff
Attachment: [text/x-patch] Node.fix-empyTags.diff