kinda brutal way of stopping plugins being able to pass *s instead of attributes

This commit is contained in:
John McLear 2013-02-10 19:36:46 +00:00
parent a67a0950dd
commit 626ee97669
2 changed files with 6 additions and 2 deletions

View file

@ -151,7 +151,7 @@ exports.getPad = function(id, text, callback)
pad.init(text, function(err) pad.init(text, function(err)
{ {
if(ERR(err, callback)) return; if(ERR(err, callback)) return;
console.warn(pad);
globalPads.set(id, pad); globalPads.set(id, pad);
callback(null, pad); callback(null, pad);
}); });

View file

@ -237,6 +237,10 @@ function getTXTFromAtext(pad, atext, authorColors)
//from but they break the abiword parser and are completly useless //from but they break the abiword parser and are completly useless
s = s.replace(String.fromCharCode(12), ""); s = s.replace(String.fromCharCode(12), "");
// remove * from s, it's just not needed on a blank line.. This stops
// plugins from being able to display * at the beginning of a line
s = s.replace("*", "");
// assem.append(_encodeWhitespace(Security.escapeHTML(s))); // assem.append(_encodeWhitespace(Security.escapeHTML(s)));
assem.append(_encodeWhitespace(s)); assem.append(_encodeWhitespace(s));
} // end iteration over spans in line } // end iteration over spans in line