+ allow rewriting of urls also with quotes

This commit is contained in:
kelson42 2013-11-18 17:11:50 +01:00
parent 27a6e645ed
commit 3406052ac2

View File

@ -292,9 +292,9 @@ static int accessHandlerCallback(void *cls,
/* Special rewrite URL in case of ZIM file use intern *asbolute* url like /A/Kiwix */
content = replaceRegex(content, "$1$2" + humanReadableBookId + "/$3/",
"(href|src)(=[\"|\']/)([A-Z|\\-])/");
"(href|src)(=[\"|\']{0,1}/)([A-Z|\\-])/");
content = replaceRegex(content, "$1$2" + humanReadableBookId + "/$3/",
"(@import[ ]+)([\"|\']/)([A-Z|\\-])/");
"(@import[ ]+)([\"|\']{0,1}/)([A-Z|\\-])/");
}
}