Monday, November 08, 2010 at 12:03 AM.
system.verbs.builtins.html.cleanForExport
on cleanForExport (text, adrPageTable=@websites.["#data"]) { <<prepare text to leave Mac environment
<<10/31/97 at 6:45:58 AM by DW -- moved from toys.cleanForExport.
if html.getPref ("useKernelCode", adrPageTable) {
on kernelcall (text) {
kernel (html.cleanforexport)};
return (kernelcall (text))}
else {
if system.environment.isMac {
on replace (searchfor, replacewith) {
if string.patternMatch (searchfor, text) != 0 { <<optimization
text = string.replaceAll (text, searchfor, replacewith)}};
replace ("Õ", "'");
replace ("¥", "o");
replace ("...", "...");
replace ("Ô", "'");
replace ("Ê", " "); <<a funny space that Word produces
replace ("“", “"”);
replace ("”", “"”);
replace ("Ð", "--");
replace ("<<", "<<");
replace ("»", ">>")};
return (text)}}
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.