HighDots Forums  

ampersand character in URIs

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss ampersand character in URIs in the HTML forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Eric Lindsay
 
Posts: n/a

Default ampersand character in URIs - 12-30-2007 , 04:35 PM






I encounter an annoying number of ampersands in URIs I copy and paste
into blog style diary entries, written in HTML with a text editor. Does
anyone happen to know of reasonably reliable method of detecting and
fixing these? At present I mostly don't notice ampersands until I get
around to validating my pages. I don't validate nearly as often as I add
invalid URIs.

At the moment I have no idea of how to automate a fix. Google didn't
turn up anything so far. One possibility might be a Bookmarklet. Another
a script done as a droplet, that accepts something from the buffer,
changes it, and puts it back into the paste buffer.

--
http://www.ericlindsay.com

Reply With Quote
  #2  
Old   
David E. Ross
 
Posts: n/a

Default Re: ampersand character in URIs - 12-31-2007 , 12:20 AM






On 12/30/2007 5:37 PM, Stefan Ram wrote:
Quote:
"David E. Ross" <nobody (AT) nowhere (DOT) not> writes:
I'm not sure, but I think this repair script will turn a good
&amp;
into
&amp;amp;

RFC 2396 does not distinguish between »good &amp;s« and others.

So, when do you deem an »&amp;« to be »good«?

I consider the entity reference "&amp;" to be good if it appears where
it is intended to represent the symbol "&" in a Web context that does
not allow the symbol "&" to represent itself.

Don't quibble about semantics. The questions are:

If the entity reference "&amp;" is already in an HTML file along with
plain "&" symbols, what will the repair() subroutine do with it?

Will "&amp;" become "&amp;amp;" or not?

--
David Ross
<http://www.rossde.com/>

Have you been using Netscape and now feel abandoned by AOL?
Then use SeaMonkey. Go to <http://www.seamonkey-project.org/>.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.