fixed: WebGUI::HTML->cleanSegment now keeps <link> when preserving script and style
This commit is contained in:
parent
10fba5dbc0
commit
6f789c9917
2 changed files with 5 additions and 0 deletions
|
|
@ -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 <link> if preserving script and style
|
||||
|
||||
7.5.22
|
||||
- fixed: Layout template now gets prepared correctly
|
||||
|
|
|
|||
|
|
@ -66,6 +66,10 @@ sub cleanSegment {
|
|||
my $headers = "";
|
||||
if ($html =~ s{(.*)<body\b.*?>}{}is && $preserveStyleScript) {
|
||||
my $head = $1;
|
||||
# extract every link tag
|
||||
while ( $head =~ m{(<link[^>]+)}isg ) {
|
||||
$headers .= $1;
|
||||
}
|
||||
# extract every script or style tag
|
||||
while ($head =~ m{(<(script|style)\b.*?</\2>)}isg) {
|
||||
$headers .= $1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue