[ic] "&" vs. "&" -- correct html links with interchange

Mike Heins interchange-users@icdevgroup.org
Sat Dec 7 14:44:00 2002


Quoting uhwduhwd@hotmail.com (uhwduhwd@hotmail.com):
> ----- Original Message -----
> From: "Jon Jensen" <jon@endpoint.com>
> To: <interchange-users@icdevgroup.org>
> Sent: Saturday, December 07, 2002 7:46 PM
> Subject: Re: [ic] "&" vs. "&amp;" -- correct html links with
> interchange
> 
> 
> > On Sat, 7 Dec 2002 uhwduhwd@hotmail.com wrote:
> >
> > > I'm trying to validate the interchange generated webpages. But
> there is
> > > a
> > >
> > > Problem:
> > >
> > > The ampersand is nor correct. Within links it is important to have
> it
> > > as &amp; - but interchange provides only an &
> > >
> > > Example:
> > >
> > >
> http://some.domain.com/cgi-bin/foundation/index.html?id=Tf8wEUwW&mv_pc=
> > > 356
> > >
> > > is not valid, it must be:
> > >
> > >
> http://some.domain.com/cgi-bin/foundation/index.html?id=Tf8wEUwW&amp;mv
> > > _pc=356
> > >
> > > that is valid.
> >
> > The Interchange link generator is intended to generate actual links
> inside
> > <a href="..."> tags, not a plain-text displayable link. If you just
> want
> > to show a link on the page, you'll have to do that extra escaping
> > yourself.
> >
> > Jon
> > _______________________________________________
> > interchange-users mailing list
> > interchange-users@icdevgroup.org
> > http://www.icdevgroup.org/mailman/listinfo/interchange-users
> >
> 
> what ever the intention of the generator is, the point is the validity
> of the returned code. And retured code has to be valid.

So make it valid (at least in your view).

> 
> So, to precise my question: how to do this escaping with the generator?
> Where is the generator located? Is it possible to do the escaping
> within Interchange, like: [some_tag]link_to_be_escaped[/some_tag]?
> 

I think you need to pay attention to the docs. If you searched for
"entities" at the web site docs you would get multiple returned links.
The first one is exactly on point.

	[filter op=entities interpolate=1][area foo][/filter]

As far as it being "important", I disagree. Every web browser in the
world reads this supposedly degenerate case, and the W3C validator is the
just about the only thing in the world that needs this "important"
point.

And the reason they claim it is important? So you can do &amp without
the trailing semicolon, to satisfy a zillion-year-old SGML spec exception
that no one needs. Talk about stupid.

In any case, IC allows you to set this behavior. Look at the UrlSepChar
directive. And peruse the code, to look at setting $Global::UrlSplittor
and $Global::UrlJoiner.

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

How far can you open your mind before your brains fall out?