I have thousands of web pages that I want to adjust using applescript and BBedit. Most of what I am doing is working just fine. However when running one particular event the end result has the “&” symbol stripped from the “ ” parts of the string. The part of the script in question is like this:
set myFile to choose file
tell application “BBEdit”
open myFile
set myLinksTextToFind to “”
set myLinksText to "<TD><FONT size=\"3\" face=\"Helvetica\" ><a href=\"http://www.google.com\" target=\"_top\">Home</a> <a href=\"http://www.google.com/somepage.html\" target=\"_self\">Image Index</a> <A href=\"mailto:info@google.com\">info@google.com</A><BR>
replace myLinksTextToFind using myLinksText searching in window 1 options {search mode:grep, starting at top:true}
save window 1
end tell
If I put in a “set the clipboard to myLinksText” I can paste the result in a new document and all works fine, it seems to be a problem going straight from script to bbedit.
Any help would be much appreciated.
Model: Mac G4
AppleScript: 2.1.1
Browser: Safari 419.3
Operating System: Mac OS X (10.4)