View Single Post
Old 05-16-2006, 02:07 PM
kinook kinook is online now
Join Date: 03-06-2001
Location: Colorado
Posts: 5,758
VBP converts double quotes in step output macros to single quotes so that if these macros are referenced in a script expression like "%LASTSTEP_OUTPUT%", double quotes within the value will not cause problems. But this can lead to the situation you're describing if the output actually contains XML attribute values with single quotes. We'll add an option in the next release to disable conversion of double to single quotes in the output macros. For now, you can work around it by converting back to double quotes in the script event before using:

' convert single quotes surrounding XML attribute values possibly
' containing single quotes back to double quotes
output = Application.ExpandMacrosAndScript("%LASTSTEP_OUTPUT%")
Set re = New RegExp
re.Pattern = "(\s*=\s*)'(([^']|'[^\s])*)'(\s)"
re.Global = True	
output = re.Replace(output, "$1""$2""$4")
' do stuff with output
Reply With Quote