Skip to content

Commit e7a5904

Browse files
committed
Don't mangle protocol relative URLs in HTML content; fixes #531
1 parent 5b2c8b0 commit e7a5904

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

okapi/core/Okapi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@ public static function fix_oc_html($html, $text_html)
11271127
*/
11281128

11291129
$html = preg_replace(
1130-
"~\b(src|href)=([\"'])(?![a-z0-9_-]+:)~",
1130+
"~\b(src|href)=([\"'])(?![a-z0-9_-]+:|//)~",
11311131
"$1=$2".Settings::get("SITE_URL"),
11321132
$html
11331133
);

0 commit comments

Comments
 (0)