--- HTML中で直接書けない文字とその実体参照の組
set entityPair to {{"&", "&"}, {"<", "<"}, {">", ">"}, {"\"", """}}
tell application "Internet Explorer"
set infoList to GetWindowInfo -1
set pageURL to text item 1 of infoList
set pageTitle to text item 2 of infoList
end tell
repeat with curList in entityPair
set yabaiMozi to text item 1 of curList
set entityStr to text item 2 of curList
set pageURL to replaceString(pageURL, yabaiMozi, entityStr)
set pageTitle to replaceString(pageTitle, yabaiMozi, entityStr)
end repeat
set Asrt to ""
set Aend to ""
set CITEsrt to ""
set CITEend to ""
---set theTag to Asrt & CITEsrt & pageTitle & CITEend & Aend
set theTag to Asrt & pageTitle & Aend
set the clipboard to theTag
--- 文字列 theString 中の findStr を replaceStr に置換
on replaceString(theString, findStr, replaceStr)
set tmp to AppleScript's text item delimiters
set AppleScript's text item delimiters to findStr
set theList to every text item of theString
set AppleScript's text item delimiters to replaceStr
set theString to theList as string
set AppleScript's text item delimiters to tmp
return theString
end replaceString