<br><br><div><span class="gmail_quote">On 7/18/07, <b class="gmail_sendername">Daniel N</b> <<a href="mailto:has.sox@gmail.com">has.sox@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>I've started looking at <a href="http://merb.devjavu.com/projects/merb/ticket/90" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ticket 90</a> and there are a couple of situations that the current implementation doesn't cater for.
<br><br><ol><li>Tag Attributes are wiped out.
<br></li><ul><li><tag1 attr1='1'>Content</tag1> #=> { "tag1" => "Content" }</li><li>I think it should return</li><li>{"tag1" => { "attr1" => '1', "__content__" => "Content" }
</li></ul></ol></blockquote><div><br>Seems I was a bit hasty with my conclusion on this one. I still don't think it is correct though.<br><br><tag1 attr='1'><strong>Content</strong></tag1>
<br>results in <br>{"tag1"=>{"strong"=>"Content", "attr"=>"1"}}<br><br>So it seems that you can only have attributes in an element that does not have a child text element.
<br><br>I also tried this<br><tag1 attr='1'><strong>Content</strong>Mixed Content</tag1><br>and got<br>{"tag1"=>"Mixed Content"}<br><br>Just to confirm.<br><br>Any thoughts on what it should be?
<br><br>Cheers<br>Daniel<br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><ol><li>Mixed content can throw an error or get clobbered
</li><ul><li><tag1>Content <em>is</em> Clobbered</tag1> #=> Raises a Private error called on array gsub</li><li><tag1>Content <em>is</em></tag1> #=> Clobbered. Returns {"tag1"=>"Content "}
</li><li>Feels like it should return</li><li>{"tag1"=>"Content &lt;em&gt;is&lt/em&gt;Clobbered" }</li></ul></ol><br>Is the current behaviour what is required or should these inconsitencies be fixed?
<br><br>Cheers<br><span class="sg">Daniel<br><br>
</span></blockquote></div><br>