You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Moshe Yudkowsky <ms...@bl.com> on 2005/12/08 02:12:58 UTC
URLs contain ampersand on output
I just ran my forrest files through a validator, and to my dismay I see
that there's a problem.
In site.xml, some of the URLs I enter have an "&" character in them. I
write these as HTML entities; otherwise site.xml won't validate.
The output of forrest has "&" in the URLs. That would be fine, except
that the page won't validate; the source code of the page has to use an
entity for "&" in the URLs.
I can't find a setting anywhere (forrest.properties, skinconf.xml., or
the xslt files) that would change this behavior.
Help?
Re: URLs contain ampersand on output
Posted by David Crossley <cr...@apache.org>.
Ross Gardler wrote:
> Moshe Yudkowsky wrote:
> >I just ran my forrest files through a validator, and to my dismay I see
> >that there's a problem.
> >
> >In site.xml, some of the URLs I enter have an "&" character in them. I
> >write these as HTML entities; otherwise site.xml won't validate.
> >
> >The output of forrest has "&" in the URLs. That would be fine, except
> >that the page won't validate; the source code of the page has to use an
> >entity for "&" in the URLs.
> >
> >I can't find a setting anywhere (forrest.properties, skinconf.xml., or
> >the xslt files) that would change this behavior.
> >
> >Help?
>
> Please raise an issue on our issue tracker for this, and if Helena's
> work around is good, please add a note about that.
Perhaps it is this ...
http://issues.apache.org/jira/browse/FOR-241
"character entities (e.g. ampersand) are expanded again for href or src attributes"
-David
Re: URLs contain ampersand on output
Posted by Ross Gardler <rg...@apache.org>.
Moshe Yudkowsky wrote:
> I just ran my forrest files through a validator, and to my dismay I see
> that there's a problem.
>
> In site.xml, some of the URLs I enter have an "&" character in them. I
> write these as HTML entities; otherwise site.xml won't validate.
>
> The output of forrest has "&" in the URLs. That would be fine, except
> that the page won't validate; the source code of the page has to use an
> entity for "&" in the URLs.
>
> I can't find a setting anywhere (forrest.properties, skinconf.xml., or
> the xslt files) that would change this behavior.
>
> Help?
Please raise an issue on our issue tracker for this, and if Helena's
work around is good, please add a note about that.
Ross
Re: URLs contain ampersand on output
Posted by David Crossley <cr...@apache.org>.
Moshe Yudkowsky wrote:
> David Crossley wrote:
>
> > Perhaps it is this ...
> > http://issues.apache.org/jira/browse/FOR-241
> > "character entities (e.g. ampersand) are expanded again for href or
> src attributes"
>
> That is indeed the issue. But I didn't understand the resolution; does
> that mean I need to use 0.8-dev to get the fix incorporated?
There is no resolution. The Bug is still open.
> Ross, I will assume that since David's issue tracked this, I don't need
> to raise a separate issue on the tracker.
Correct.
-David
Re: URLs contain ampersand on output
Posted by CFAS Webmaster <we...@cfas.org>.
Moshe Yudkowsky wrote:
>
> I wrote:
> >>
> >>>I just ran my forrest files through a validator, and to my dismay I
> see
> >>>that there's a problem.
> >>>
> >>>In site.xml, some of the URLs I enter have an "&" character in them. I
> >>>write these as HTML entities; otherwise site.xml won't validate.
>
> [snip]
> If I use "&amp;", I get & resulting html output. That works
> and that validates, so that will be my workaround in the meantime.
> [snip]
However, putting this into the issue comments would help others find the
workaround until this is fixed...
-Paul
workaround for && in xdocs/*
Posted by Helena Edelson <he...@greenjaguar.com>.
this workaround works for links with "&" in the URL when the link is in
xdocs/
here is an example of one I used:
http://www.tranexp.com:2000/InterTran?url=http%3A%2F%2Fwww.summitjournal.com&type=text&text=&from=eng&to=fin
both in site.xml and in xdocs/translate.xml type content files.
I am not sure why it won't work for your dev but I am using F7 not F8
If this helps anyone I also successfully used:
&& in place of && in xslt files also for those bleak times I
have to rely on a small javascript.
& won't work neither will or any of those. just get a good
ascii ref to keep the validators happy.
Helena
Moshe Yudkowsky wrote:
>
> I wrote:
> >>
> >>>I just ran my forrest files through a validator, and to my dismay I
> see
> >>>that there's a problem.
> >>>
> >>>In site.xml, some of the URLs I enter have an "&" character in them. I
> >>>write these as HTML entities; otherwise site.xml won't validate.
>
> Helena Edelson wrote:
>
> > concat and replace & with & your url's.
>
> If I use "&" instead of & in the url in site.xml, I have the
> same problem.
>
> If I use "&amp;", I get & resulting html output. That works
> and that validates, so that will be my workaround in the meantime.
>
>
> David Crossley wrote:
>
> > Perhaps it is this ...
> > http://issues.apache.org/jira/browse/FOR-241
> > "character entities (e.g. ampersand) are expanded again for href or
> src attributes"
>
> That is indeed the issue. But I didn't understand the resolution; does
> that mean I need to use 0.8-dev to get the fix incorporated?
>
> Ross, I will assume that since David's issue tracked this, I don't
> need to raise a separate issue on the tracker.
>
>
Re: URLs contain ampersand on output
Posted by Moshe Yudkowsky <ms...@bl.com>.
I wrote:
>>
>>>I just ran my forrest files through a validator, and to my dismay I see
>>>that there's a problem.
>>>
>>>In site.xml, some of the URLs I enter have an "&" character in them. I
>>>write these as HTML entities; otherwise site.xml won't validate.
Helena Edelson wrote:
> concat and replace & with & your url's.
If I use "&" instead of & in the url in site.xml, I have the
same problem.
If I use "&amp;", I get & resulting html output. That works and
that validates, so that will be my workaround in the meantime.
David Crossley wrote:
> Perhaps it is this ...
> http://issues.apache.org/jira/browse/FOR-241
> "character entities (e.g. ampersand) are expanded again for href or
src attributes"
That is indeed the issue. But I didn't understand the resolution; does
that mean I need to use 0.8-dev to get the fix incorporated?
Ross, I will assume that since David's issue tracked this, I don't need
to raise a separate issue on the tracker.
--
Moshe Yudkowsky
work: http://www.Disaggregate.com
book: http://www.PebbleAndAvalanche.com
Re: URLs contain ampersand on output
Posted by Helena Edelson <he...@greenjaguar.com>.
sorry, forgot to mention - make sure to concat and replace & with &
your url's.
Helena Edelson wrote:
> try the ascii version in place of &
>
> Moshe Yudkowsky wrote:
>
>> I just ran my forrest files through a validator, and to my dismay I
>> see that there's a problem.
>>
>> In site.xml, some of the URLs I enter have an "&" character in them.
>> I write these as HTML entities; otherwise site.xml won't validate.
>>
>> The output of forrest has "&" in the URLs. That would be fine, except
>> that the page won't validate; the source code of the page has to use
>> an entity for "&" in the URLs.
>>
>> I can't find a setting anywhere (forrest.properties, skinconf.xml.,
>> or the xslt files) that would change this behavior.
>>
>> Help?
>>
>>
>>
>>
Re: URLs contain ampersand on output
Posted by Helena Edelson <he...@greenjaguar.com>.
try the ascii version in place of &
Moshe Yudkowsky wrote:
> I just ran my forrest files through a validator, and to my dismay I
> see that there's a problem.
>
> In site.xml, some of the URLs I enter have an "&" character in them. I
> write these as HTML entities; otherwise site.xml won't validate.
>
> The output of forrest has "&" in the URLs. That would be fine, except
> that the page won't validate; the source code of the page has to use
> an entity for "&" in the URLs.
>
> I can't find a setting anywhere (forrest.properties, skinconf.xml., or
> the xslt files) that would change this behavior.
>
> Help?
>
>
>
>