Replacing special characters

Hi

I have tried searching for replace function but all seem to be replacing text in text files etc. What I am looking for is a replace function that allows me to replace applescript code within an applescript.

What I have is some CSS code that looks something like this ( see applescript below), where I have already replaced quotes with Chr(34) so the applescript code compiles ok…but I need to replace the Chr(34) back to quotes so the CSS keeps its formatting. I have tried escaping the quotes which works but it causes the CSS to lose its formating and the result is just plain text with no formatting.

Can any one point me in the right direction if I am attempting something that could be solved from a different approach…many thanks

set theRecipient to {"John.52@hrspro.co.uk; "}
set theCCRecipient to {""}
set theBCCRecipient to {""}
set theSubject to "Attached CVs"
set theContent to "<HTML><body><SPAN STYLE= Chr(34)font-family: 'Verdana';font-size: 12px;Chr(34) >Thank you </SPAN>  <SPAN STYLE= Chr(34)font-family: 'Verdana';font-size: 12px;font-weight: bold;Chr(34) >very</SPAN>  <SPAN STYLE= Chr(34)font-family: 'Verdana';font-size: 12px;Chr(34) > much for </SPAN>  <SPAN STYLE= Chr(34)font-family: 'Verdana';font-size: 12px;text-decoration:underline;Chr(34) >taking</SPAN>  <SPAN STYLE= Chr(34)font-family: 'Verdana';font-size: 12px;Chr(34) > the time to </SPAN>  <SPAN STYLE= Chr(34)font-family: 'Verdana';font-size: 12px;color: #AA0000;Chr(34) >interview</SPAN>  <SPAN STYLE= Chr(34)font-family: 'Verdana';font-size: 12px;Chr(34) > . </SPAN>  <SPAN STYLE= Chr(34)font-family: 'Verdana';font-size: 12px;font-weight: bold;Chr(34) ><BR></SPAN>  <SPAN STYLE= Chr(34)font-family: 'Verdana';font-size: 12px;Chr(34) ><BR><BR></SPAN></Body></HTML>"
set theAttachment to {alias "Macintosh HD:Users:macmini:Documents:HRS:TempDocs:Adam Bardell.doc", "Macintosh HD:Users:macmini:Documents:HRS:TempDocs:Alan Jones.doc"}
tell application "Microsoft Entourage"
	set msg to make new outgoing message with properties {subject:theSubject, content:theContent, recipient:theRecipient, attachment:theAttachment, has html:true, CC recipients:theCCRecipient, BCC recipients:theBCCRecipient}
	activate
end tell

Hi Kevin,

it’s much easier:
Just escape the quote with a backslash (")

Hi

Thanks…I did mention that I tried this and the applescript ran with no bugs but the CSS did not display any of the formatting instead just showed all the text as plain text.

Then the reasaon must be different. Escaping quotes makes the text “readable” for AppleScript, nothing else.
Does Entourage can handle CSS?

good question…I will see if i can find any info on that…thanks

Hi

Yes Entourage can support CSS…I gues I just have to find out how entourage likes the code witten…apparently it must be written in a specific way…do you know of anyone who might have done this already?

Thanks

Unfortunately no