diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index f0232cd94..e5ac35cf2 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -86,6 +86,7 @@ - fixed: Utility script skeleton now more complete and less annoying - fixed: HttpProxy parser now handles self-closing tags correctly - fixed: HttpProxy parser now doesn't try to rewrite forms unless also rewriting URLs + - fixed: WebGUI::HTML->cleanSegment now also keeps if preserving script and style 7.5.22 - fixed: Layout template now gets prepared correctly diff --git a/lib/WebGUI/HTML.pm b/lib/WebGUI/HTML.pm index ef0ce86f0..e92c25b29 100644 --- a/lib/WebGUI/HTML.pm +++ b/lib/WebGUI/HTML.pm @@ -66,6 +66,10 @@ sub cleanSegment { my $headers = ""; if ($html =~ s{(.*)}{}is && $preserveStyleScript) { my $head = $1; + # extract every link tag + while ( $head =~ m{(]+)}isg ) { + $headers .= $1; + } # extract every script or style tag while ($head =~ m{(<(script|style)\b.*?)}isg) { $headers .= $1;