From 6f789c9917ff9a13b957849ca3ede4a84b984949 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Tue, 23 Sep 2008 17:18:20 +0000 Subject: [PATCH] fixed: WebGUI::HTML->cleanSegment now keeps when preserving script and style --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/HTML.pm | 4 ++++ 2 files changed, 5 insertions(+) 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;