Insert URL adds non html characters ...

Found a bug? Tell us!!
Post Reply
Lux
Regular
Posts: 764
Joined: Fri Aug 12, 2005 4:36 pm
Location: Grüt, Zürich, Switzerland
Contact:

Insert URL adds non html characters ...

Post 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
danst0
Regular
Posts: 197
Joined: Tue Jul 13, 2004 10:50 am

Re: Insert URL adds non html characters ...

Post by danst0 »

Hi,
I cannot confirm the bug, just made an url to: "http://test.domain.com/serendipity_admi ... ction]=new" without problem.

Daniel
Lux
Regular
Posts: 764
Joined: Fri Aug 12, 2005 4:36 pm
Location: Grüt, Zürich, Switzerland
Contact:

Re: Insert URL adds non html characters ...

Post by Lux »

danst0 wrote:I cannot confirm the bug, just made an url to: "http://test.domain.com/serendipity_admi ... ction]=new" without problem.
Can you please send me the link to the blog post?

Cheers

Dirk
danst0
Regular
Posts: 197
Joined: Tue Jul 13, 2004 10:50 am

Re: Insert URL adds non html characters ...

Post 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>
Lux
Regular
Posts: 764
Joined: Fri Aug 12, 2005 4:36 pm
Location: Grüt, Zürich, Switzerland
Contact:

Re: Insert URL adds non html characters ...

Post by Lux »

danst0 wrote: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>
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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Insert URL adds non html characters ...

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Lux
Regular
Posts: 764
Joined: Fri Aug 12, 2005 4:36 pm
Location: Grüt, Zürich, Switzerland
Contact:

Re: Insert URL adds non html characters ...

Post 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
Post Reply