Skip to content
Snippets Groups Projects
Commit 0b6389fe authored by sand's avatar sand
Browse files

also rewrite <a> tags

parent 9ac03298
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ if ( !function_exists('add_action') ) {
function rewrite_links($buffer) {
// replace href or src attributes within script, link, base, and img tags with just "//" for protocol
$re = "/(<(?:script|link|base|img|form)(?:[^>]*)(?:href|src|action)=[\"'])http:\\/\\/([^.]+\.noblogs\.org)/i";
$re = "/(<(?:script|link|base|img|form|a)(?:[^>]*)(?:href|src|action)=[\"'])http:\\/\\/([^.]+\.noblogs\.org)/i";
$subst = "$1https://$2";
return preg_replace($re, $subst, $buffer);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment