Page 1 of 1
Insert URL adds non html characters ...
Posted: Tue Feb 01, 2011 1:22 pm
by Lux
Hi,
maybe it is to hard to speak of a bug.
If you enter a posting in plain text, mark some text and hit the URL button, you are able to enter an URL and Serendipity does the "<a href ...></a>" around your marked text.
This works perfectly.
In case your URL contains non-HTML characters like the ampersand, you get an error with any validation service.
Could you please fix that?
Thanks a lot
Dirk
Re: Insert URL adds non html characters ...
Posted: Tue Feb 01, 2011 1:33 pm
by danst0
Hi,
I cannot confirm the bug, just made an url to: "
http://test.domain.com/serendipity_admi ... ction]=new" without problem.
Daniel
Re: Insert URL adds non html characters ...
Posted: Tue Feb 01, 2011 1:51 pm
by Lux
Can you please send me the link to the blog post?
Cheers
Dirk
Re: Insert URL adds non html characters ...
Posted: Tue Feb 01, 2011 2:17 pm
by danst0
Its only on my test installation and not accessible from outside...
This is how the generated source looks like:
<a href="
http://test.domain.com/serendipity_admi ... ction]=new" title="
http://test.domain.com/serendipity_admi ... ew">abc</a>
Re: Insert URL adds non html characters ...
Posted: Tue Feb 01, 2011 2:34 pm
by Lux
Put it on a website and try to validate it through
http://validator.w3.org/check
Then you will get, what I was trying to say.
An entity reference was found in the document, but there is no reference by that name defined. Often this is caused by misspelling the reference name, unencoded ampersands, or by leaving off the trailing semicolon (;). The most common cause of this error is unencoded ampersands in URLs as described by the WDG in "Ampersands in URLs".
Cheers
Dirk
Re: Insert URL adds non html characters ...
Posted: Tue Feb 01, 2011 2:51 pm
by garvinhicking
Hi!
You either need to encode your URL and replace "&" with "&" or you need to install the XHTML cleanup plugin.
On an unrelated sidenote I think it was bad by the W3C to pick "&" as an entity denoted and make parsing be extra picky to complain if an entity does not exist.
Regards,
Garvin
Re: Insert URL adds non html characters ...
Posted: Tue Feb 01, 2011 3:01 pm
by Lux
garvinhicking wrote:You either need to encode your URL and replace "&" with "&" or you need to install the XHTML cleanup plugin.
Plugin installed. I know the manual fix, but I tend to forget that
garvinhicking wrote:On an unrelated sidenote I think it was bad by the W3C to pick "&" as an entity denoted and make parsing be extra picky to complain if an entity does not exist.
Agreed.
Dirk