+ fix @import css code url rewriting

This commit is contained in:
kelson42 2012-05-31 09:35:52 +00:00
parent f3d409dc10
commit d0829d9dbf

View File

@ -251,7 +251,10 @@ static int accessHandlerCallback(void *cls,
if (mimeType.find("text/html") != string::npos) {
/* Special rewrite URL in case of ZIM file use intern *asbolute* url like /A/Kiwix */
replaceRegex(content, "$1=\"/" + humanReadableBookId + "/$3/", "(href|src)(=\"/)([A-Z|\\-])/");
replaceRegex(content, "$1$2" + humanReadableBookId + "/$3/",
"(href|src)(=[\"|\']/)([A-Z|\\-])/");
replaceRegex(content, "$1$2" + humanReadableBookId + "/$3/",
"(\@import[ ]+)([\"|\']/)([A-Z|\\-])/");
if (searcher != NULL) {
introduceTaskbar(content, humanReadableBookId);