Content deleted Content added
attempt an escaping function |
try changing scope |
||
Line 4:
{
$("#editform").prepend('<div id="footnote-cleanup"><a href="javascript:cleanupFootnotes()">clean up footnotes</a></div>');
function escape(text, regexString, escapeTable, i)▼
var regex = new RegEx(regexString, "g");▼
text = text.replace(▼
regex,▼
function(match)▼
{▼
escapeTable[i] = match;▼
replacement = "%%" + i + "%%";▼
i += 1;▼
return replacement;▼
}▼
return text;▼
}
Line 30 ⟶ 14:
var oldContents = textbox.val();
var contents = oldContents;
▲ {
▲ regex,
▲ function(match)
{
▲ escapeTable[i] = match;
▲ replacement = "%%" + i + "%%";
▲ i += 1;
▲ return replacement;
}
);
▲ }
// Escape ref tags.
|