Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Bug in 2.0.7: x.link reference

Hey,

I just "upgraded" to 2.0.7 beta and encounterd one problem. I used to use (in 2.0.5) the following syntax:

<a href="{$ x.link $}">{$ x.headline $}</a>

In 2.0.7 this end up in:

<a href="%20{$%20x.link%20$}">{$ x.headline $}</a>

And it won't compile ....

I think the %20 are supposed to reprensent spaces, which messes up the scripting.

Menno Tillema
Saturday, July 26, 2003

I don't know how you got the %20's in there; I've never seen this!. If you can figure out what caused them I'd love to know!

Joel Spolsky
Saturday, July 26, 2003

%20 = space in HTTP

Probably he edited this link in an external editor that insisted on turing the space into the HTTP code for space.

www.marktaw.com
Saturday, July 26, 2003

... of course I should fully read the post before I reply to it. lol.

www.marktaw.com
Saturday, July 26, 2003

Okay, here are the steps to reproduce this one...

1. Create a new site in 2.0.7.
2. Open the 'getting started' article.
3. Switch to HTML view.
4. Put the following on the first line:

<a href="{$ .link $}">{$ .headline $}</a>

5. Switch to Normal and then HTML view.
6. Note that it's been changed to:

<a href="{$%20.link%20$}">{$ .headline $}</a>

Happens every time on my machine.

John C
Saturday, July 26, 2003

Aha! I see it. I know why it's happening, too: spaces are illegal in URLs, so the xhtml-cleaning code (html tidy) sees them and replaces them with %20.

I'll find some way to fix it!

Joel Spolsky
Saturday, July 26, 2003

Fixed already. Excellent,  thanks for the bug report.

Joel Spolsky
Saturday, July 26, 2003

*  Recent Topics

*  Fog Creek Home