Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2009-02-17 08:30:39
- forgethisname
- New Member
- Registered: 2007-01-22
- Posts: 5
Bad ampersand encoding from build tag
Hi,
If I use the tag builder on the Files tab to create Textile or XHTML for a file download link, I get an extra #38;
in the resulting code which means that the link doesn’t work see
"0042_001.pdf":http://www.xxx.com/index.php?s=file_download&id=118
<a href="http://www.xxx.com/index.php?s=file_download&id=118">0042_001.pdf</a>
Can anyone help with a solution?
Thanks
Offline
Re: Bad ampersand encoding from build tag
Seems to be a bug if you are in messy mode. Just remove the “#38;” (leaving the &
).
wet wrote:
Please be aware of the fact that
&
is the valid entity encoding for an ampersand. Cf. HTML 4.01 specification, appendix B.
My mistake — I took the OP at his word when saying the link didn’t work.
Last edited by jsoo (2009-02-17 15:17:26)
Code is topiary
Offline
Re: Bad ampersand encoding from build tag
Please be aware of the fact that &
is the valid entity encoding for an ampersand. Cf. HTML 4.01 specification, appendix B.
Offline
Re: Bad ampersand encoding from build tag
Thanks for the report, though I was a bit slow to understand the real problem here. Fixed in r3114.
Offline
#5 2009-02-19 15:36:23
- forgethisname
- New Member
- Registered: 2007-01-22
- Posts: 5
Re: Bad ampersand encoding from build tag
Firstly, thank you for your quick responses.
Please excuse my ignorance.
- I note your reference to the HTML 4.01 spec. stating that this is valid entity encoding of the ampersand; nonetheless the code generated by the tag builder doesn’t generate a valid link when the article in which it is pasted is rendered. Is this a problem with my server or with TxP?
- Does “Fixed in r3114” mean it has been identified as a bug and rectified ready for release in the next version? If so, is it safe for me to apply the correction to my clients installation in the meantime?
Offline
Re: Bad ampersand encoding from build tag
forgethisname wrote:
I note your reference to the HTML 4.01 spec. stating that this is valid entity encoding of the ampersand; nonetheless the code generated by the tag builder doesn’t generate a valid link when the article in which it is pasted is rendered. Is this a problem with my server or with TxP?
This is a bug in Textpattern and does not depend on the server. The ampersand was entity-encoded twice (once by the tag builder, once again by Textile). I’ve removed the first encoding.
Does “Fixed in r3114” mean it has been identified as a bug and rectified ready for release in the next version?
Yes.
If so, is it safe for me to apply the correction to my clients installation in the meantime?
Yes.
Offline
#7 2009-02-20 09:16:58
- forgethisname
- New Member
- Registered: 2007-01-22
- Posts: 5
Re: Bad ampersand encoding from build tag
Fantastic. Thanks so much.
Offline
Pages: 1