mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-27 14:21:18 -04:00
+ fix @import css code url rewriting
This commit is contained in:
parent
f3d409dc10
commit
d0829d9dbf
@ -251,7 +251,10 @@ static int accessHandlerCallback(void *cls,
|
|||||||
if (mimeType.find("text/html") != string::npos) {
|
if (mimeType.find("text/html") != string::npos) {
|
||||||
|
|
||||||
/* Special rewrite URL in case of ZIM file use intern *asbolute* url like /A/Kiwix */
|
/* 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) {
|
if (searcher != NULL) {
|
||||||
introduceTaskbar(content, humanReadableBookId);
|
introduceTaskbar(content, humanReadableBookId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user