You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Robert Edgar <ro...@eeplace.com> on 2001/08/01 04:40:51 UTC

Problem with simple replace

We are using velocity to customize an html formatted email template.

In the html document we have a velocity tag ${BASEURL} that we use as a
prefix the src attribute of all image tags to turn what are effectively
relative ref's by the html designer to absolute ref's

ie so that "/images/spacer.gif" becomes
"http://www.somewhere.com/images/spacer.gif"

In one instance yesterday we ran into a problem where the file required
about 80 such replacements and all but one was OK but the incorrect one had
"www..somewhere.com" ie for no reason whatsoever there was an extra "."

Anyone seen any issue like this, its really weird as surely the relacement
string is effectively a constant (at least on one run through the document)
so how come the other 79 times in the same document it was OK.

Rob Edgar


Re: Problem with simple replace

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Robert Edgar wrote:
> 
> We are using velocity to customize an html formatted email template.
> 
> In the html document we have a velocity tag ${BASEURL} that we use as a
> prefix the src attribute of all image tags to turn what are effectively
> relative ref's by the html designer to absolute ref's
> 
> ie so that "/images/spacer.gif" becomes
> "http://www.somewhere.com/images/spacer.gif"
> 
> In one instance yesterday we ran into a problem where the file required
> about 80 such replacements and all but one was OK but the incorrect one had
> "www..somewhere.com" ie for no reason whatsoever there was an extra "."
> 
> Anyone seen any issue like this, its really weird as surely the relacement
> string is effectively a constant (at least on one run through the document)
> so how come the other 79 times in the same document it was OK.
> 
> Rob Edgar

Did you ever figure this out?

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
Well done is better than well said - New England Proverb