[Petal] [WEIRD] Strange stuff with HTML Entities

Mark Holland mark at thinkfoo.com
Wed Oct 29 13:14:25 GMT 2003


William McKee wrote:

>On Wed, Oct 29, 2003 at 01:21:42AM +0000, Mark Holland wrote:
>  
>
>>Does anyone have a clue what's causing the following to happen? Since 
>>Petal-1.05, petal outputs html entities like   something like this:
>>    
>>
>Can you provide a sample script that can reproduce the error? I haven't
>seen the problem you are describing.
>  
>
Thanks for the reply. I've attached an xhtml template that does this. 
Just running it on the command line produces the weird characters. I've 
gzipped the file in case it gets munged in the email. Try running it 
like this (using a version of Petal >= 1.05):

# export PETAL_INPUT=XHTML
# export PETAL_OUTPUT=XHTML
# perl -MPetal -e canonical default.xhtml

For me it produces this output:

<table>
        <tr>
                <td>
                        Â  <a <?attr name="href" 
value="string:/admin/albums/photos/add?category=${category/id}"?>>add 
photo</a>Â
                        <a <?attr name="href" 
value="string:/admin/albums/category/edit?id=${category/id}"?>>edit 
category</a>Â
                        <a <?attr name="href" 
value="string:/admin/albums/category/move?id=${category/id}"?>>move 
category</a>Â
                        <a <?attr name="href" 
value="string:/admin/albums/category/delete?id=${category/id}"?>>delete 
category</a>Â
                        <?if name="false:ARGS/archived"?><a <?attr 
name="href" 
value="string:/admin/albums/photos/view?id=${category/id}&amp\;archived=yes"?>>show 
archived photos</a><?end?>
                        <?if name="true:ARGS/archived"?><a <?attr 
name="href" 
value="string:/admin/albums/photos/view?id=${category/id}"?>>hide 
archived photos</a><?end?>
                <input type="submit" value="next &gt;Â &gt;" />
                </td>
        </tr>
</table>

I notice it seems to only affect &nbsp; entities - other tags like &gt; 
are left alone.

Cheers,
mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: default.xhtml.gz
Type: application/x-gzip
Size: 297 bytes
Desc: not available
Url : http://lists.webarch.co.uk/pipermail/petal/attachments/20031029/343f535c/default.xhtml.bin


More information about the Petal mailing list