You are here: Foswiki>Tasks Web>Item13791 (23 Nov 2015, GeorgeClark)Edit Attach

Item13791: Backport CSS classes in script/link/style elements in zones for 1.1.x.

Priority: Enhancement
Current State: Closed
Released In: 1.1.10
Target Release: patch
Applies To: Engine
Branches: Release01x01
Reported By: MichaelDaum
Waiting For:
Last Change By: GeorgeClark
... Required for AngularSkin and RenderPlugin to properly inject css and js as required by TML snippets loaded async'ly

diff --git a/lib/ b/lib/
index 17e2e22..c1d17ba 100644
--- a/lib/
+++ b/lib/
@@ -3457,6 +3457,11 @@ sub addToZone {
         $thisZone->{$id} = $zoneID;

+    # add class to script and link data
+    $data =~ s/<script\s+((?![^>]*class=))/<script class='\$zone \$id' $1/g;
+    $data =~ s/<link\s+((?![^>]class=))/<link class='\$zone \$id' $1/g;
+    $data =~ s/<style\s+((?![^>]*class=))/<style class='\$zone \$id' $1/g;
     # override previous properties
     $zoneID->{zone}            = $zone;
     $zoneID->{requires}        = \@requires;

-- MichaelDaum - 05 Oct 2015


ItemTemplate edit

Summary Backport CSS classes in script/link/style elements in zones for 1.1.x.
ReportedBy MichaelDaum
Codebase 1.1.9
SVN Range
AppliesTo Engine
Priority Enhancement
CurrentState Closed
Checkins distro:391ebb103270 distro:6f5207a03658
TargetRelease patch
ReleasedIn 1.1.10
CheckinsOnBranches Release01x01
Release01x01Checkins distro:391ebb103270 distro:6f5207a03658
Topic revision: r4 - 23 Nov 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy