1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

client rewrite: rewrite_html() ensure rewriting string!

This commit is contained in:
Ilya Kreymer 2017-07-23 09:02:03 -07:00
parent 9d86601aab
commit c88b843170

View File

@ -1416,6 +1416,10 @@ var _WBWombat = function($wbwindow, wbinfo) {
write_buff = "";
}
if (typeof string != "string" ) {
string = string.toString();
}
var orig_string = string;
string = string.replace(/<(\/?)(FRAME|TD|TR|TH)\b/ig, "<$1PYWB_$2");
@ -1426,8 +1430,6 @@ var _WBWombat = function($wbwindow, wbinfo) {
return string;
}
string = string.toString();
if (string.indexOf("<script") <= 0) {
//string = string.replace(/WB_wombat_/g, "");
string = string.replace(/((id|class)=".*)WB_wombat_([^"]+)/, '$1$3');