replacing quotes
"Brigitte Spatz" <[email protected]> Thu, 7 Aug 2003 21:03:24 +0200
| Newsgroups | gmane.comp.lang.delphi.programming |
|---|---|
| Message-ID | <000901c35d16$9db67530$8becfea9@LAPTOP> |
For a Javascript function that's called from a website my application
produces I need to replace any apostrophes by \' but I can't seem to get
this to work:
if Pos('''', aString) > 0 then
Result := QuotedStr(StringReplace(aString, '''', '\' + #39,
[rfReplaceAll]))
returns \'' - where does the second ' come from??? I've also tried with
if Pos('''', aString) > 0 then
Result := QuotedStr(StringReplace(aString, '''', '\''',
[rfReplaceAll]))
with the same result :-(
Any ideas?
TIA.
Brigitte
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/i7folB/TM
---------------------------------------------------------------------~->
CodeCoffer - new Delphi code protection Tool!
http://www.delphicollection.com/public/CodeCoffer.htm
---------------------------------------------------------------
Unsubscribe:[email protected]
List owner:[email protected]
---------------------------------------------------------------
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/