[thelist] Line breaks with ASP

Kevin Stevens kjs at ratking.co.uk
Sun Oct 27 10:27:01 CST 2002


> The first works because the condition is met... the else(s) not being
> considered. Simplify, for example:
>
> Function EscapeDBData(varDataLine)
> EscapeDBData=""
> if len(varDataLine)=0 then exit function
> varDataLine=Replace(varDataLine,"'","''")
> varDataLine=Replace(varDataLine,"%","%")
> varDataLine=Replace(varDataLine,vbcrlf,"<br />")
> EscapeDBData=varDataLine
> End Function

<slaps forehead!>
That's done the trick, thanks. It's kind of obvious really, but I figured it
would just go through each Replace, one after the other.

Kevin Stevens
kjs at ratking.co.uk




More information about the thelist mailing list