Monday, November 08, 2010 at 12:03 AM.

system.verbs.builtins.html.processMacros

on processMacros (s, plainprocessing=false, adrPageTable=nil) {
	<<Process HTML macros.
	<<Old code:
		<<In order to apply double-byte language support,
			<<this script should check for the useKernelCode pref.
			<<If true, call the kernel verb.
			<<If false, call your own version of the below code.
			<<Note: you *must* replace the string.processHtmlMacros call
			<<with your own version, as string.processHtmlMacros has different behavior
			<<than it used to.
		<<local (adrcallback = @html.data.processMacrosCallback)
		<<local (flaps = html.getPref ("autoParagraphs"))
		<<local (activeURLs = html.getPref ("activeURLs"))
		<<local (clayCompatibility = html.getPref ("clayCompatibility"))
		<<if plainprocessing
			<<Sometimes we don't want autoparagraphs, activeURLs, or clayCompatibility.
				<<In a pageheader, for instance.
				<<Tuesday, January 27, 1998 at 10:06:05 AM by PBS
			<<flaps = false
			<<activeURLs = false
			<<clayCompatibility = false
		<<s = string.processHtmlMacros (string (s), flaps, activeURLs, clayCompatibility, adrcallback)
		<<if html.getPref ("isoFilter", html.data.adrPageTable)
			<<local (adrtable)
			<<case sys.os ()
				<<"MacOS"
					<<adrtable = @html.data.iso8859.mac
			<<else
				<<adrtable = @html.data.iso8859.win
			<<s = string.iso8859encode (s, adrtable) <<convert special characters to HTML equivalents
		<<return (s)
	<<Security fix 1/13/99:
		<<Escaped curly braces are converted to html entities to prevent evaluation.
		<<PBS 1/18/99: Do the fix in the glue only if this is not Frontier 5.1.6 or greater.
		<<The kernel is now stricter about escaping macros.
	if date.versionLessThan (frontier.version (), "5.1.6") { //PBS 1/18/99
		s = string.replaceAll (s, "\\{", "{")}; //PBS 1/13/99: security fix
	if adrPageTable == nil {
		adrPageTable = html.getPageTableAddress ()};
	on kernelcall (s, plainprocessing, adrPageTable) {
		kernel (html.processmacros)};
	return (kernelcall (s, plainprocessing, adrPageTable))}



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.