Jump to content

Substitute "

This topic is 6160 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I have a bunch of " 's in my html. The app im using with apple script doesn't like this. If I remove all the " from my html it works fine. Im trying to substitute all this with this.

Set Field [EmailBuilder::Email_FullText Fix; Substitute ( EmailBuilder_FullText ; """ ; "in." )]

Here is my HTML

Quote #1650430 from Turner Industries


Turner Industries

4670 36th St SE Grand Rapids, MI 49512

p:616-949-5910 f:616-949-3461


Reply To:jkraus@turnerin d.com

Link to comment
Share on other sites

Your problem is simple. You need to turn OFF Smart Quotes for that file. The Smart Quotes toggle is in the File Options, Text tab. Then redo (or replace) your quotes in the html (you can copy a smart quote to replace it; you can't type it once you turn them off; they are 2 different characters, a beginning one, and an ending one).

Or use a text editor, like the free TextWrangler, which may have a Straighten Quotes command (BBEdit does).

It's not really AppleScript, it's the web browser that can't handle smart quotes (unless they're specified correctly as an character entity, which you also could do, but do you really want them?).

AppleScript considers double quotes to be a special character. But it seems to escape them automatically when you feed it data from a FileMaker field. The following, run in a Perform AppleScript step, will write the contents of a "_cHTML" field from the current FileMaker record to a text file on your Desktop. The field must be on the current layout for this simple form to work.

set html_raw to cell "_cHTML" of current record

set html_text to quoted form of html_raw

do shell script "echo -n " & html_text & " > ~/Desktop/html_text.html"

Edited by Guest
Link to comment
Share on other sites

This topic is 6160 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.