Skip to content

Commit

Permalink
fixed xss vulnerability in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
janpaepke committed Jan 6, 2016
1 parent a4cbf37 commit c202878
Show file tree
Hide file tree
Showing 25 changed files with 138 additions and 37 deletions.
6 changes: 5 additions & 1 deletion dev/docs/template/tmpl/layout.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@

<script>
function openDeeplinkedElement (skipAni) {
$("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
try {
$("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
} catch (e) {
console.warn("ah ah ah! :p");
}
}
$( function () {
$( "#toc" ).toc( {
Expand Down
26 changes: 15 additions & 11 deletions docs/ScrollMagic.Controller.html
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-286">line 286</a>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-287">line 287</a>
</li></ul></dd>


Expand Down Expand Up @@ -789,7 +789,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-657">line 657</a>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-658">line 658</a>
</li></ul></dd>


Expand Down Expand Up @@ -931,7 +931,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-329">line 329</a>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-330">line 330</a>
</li></ul></dd>


Expand Down Expand Up @@ -1122,7 +1122,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-476">line 476</a>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-477">line 477</a>
</li></ul></dd>


Expand Down Expand Up @@ -1282,7 +1282,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-407">line 407</a>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-408">line 408</a>
</li></ul></dd>


Expand Down Expand Up @@ -1476,7 +1476,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-368">line 368</a>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-369">line 369</a>
</li></ul></dd>


Expand Down Expand Up @@ -1631,7 +1631,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-633">line 633</a>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-634">line 634</a>
</li></ul></dd>


Expand Down Expand Up @@ -1785,7 +1785,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-607">line 607</a>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-608">line 608</a>
</li></ul></dd>


Expand Down Expand Up @@ -1943,7 +1943,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-541">line 541</a>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-542">line 542</a>
</li></ul></dd>


Expand Down Expand Up @@ -2109,7 +2109,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-574">line 574</a>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-575">line 575</a>
</li></ul></dd>


Expand Down Expand Up @@ -2214,7 +2214,11 @@ <h5>Example</h5>

<script>
function openDeeplinkedElement (skipAni) {
$("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
try {
$("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
} catch (e) {
console.warn("ah ah ah! :p");
}
}
$( function () {
$( "#toc" ).toc( {
Expand Down
6 changes: 5 additions & 1 deletion docs/ScrollMagic.Scene.html
Original file line number Diff line number Diff line change
Expand Up @@ -7210,7 +7210,11 @@ <h5>Example</h5>

<script>
function openDeeplinkedElement (skipAni) {
$("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
try {
$("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
} catch (e) {
console.warn("ah ah ah! :p");
}
}
$( function () {
$( "#toc" ).toc( {
Expand Down
6 changes: 5 additions & 1 deletion docs/ScrollMagic.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,11 @@ <h3 class="subsection-title">Classes</h3>

<script>
function openDeeplinkedElement (skipAni) {
$("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
try {
$("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
} catch (e) {
console.warn("ah ah ah! :p");
}
}
$( function () {
$( "#toc" ).toc( {
Expand Down
6 changes: 5 additions & 1 deletion docs/ScrollMagic.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,11 @@ <h1 class="page-title">Source: ScrollMagic.js</h1>

<script>
function openDeeplinkedElement (skipAni) {
$("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
try {
$("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
} catch (e) {
console.warn("ah ah ah! :p");
}
}
$( function () {
$( "#toc" ).toc( {
Expand Down
9 changes: 7 additions & 2 deletions docs/ScrollMagic_Controller.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ <h1 class="page-title">Source: ScrollMagic/Controller.js</h1>
_options.container.addEventListener("resize", onChange);
_options.container.addEventListener("scroll", onChange);

_options.refreshInterval = parseInt(_options.refreshInterval) || DEFAULT_OPTIONS.refreshInterval;
var ri = parseInt(_options.refreshInterval, 10);
_options.refreshInterval = _util.type.Number(ri) ? ri : DEFAULT_OPTIONS.refreshInterval;
scheduleRefresh();

log(3, "added new " + NAMESPACE + " controller (v" + ScrollMagic.version + ")");
Expand Down Expand Up @@ -863,7 +864,11 @@ <h1 class="page-title">Source: ScrollMagic/Controller.js</h1>

<script>
function openDeeplinkedElement (skipAni) {
$("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
try {
$("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
} catch (e) {
console.warn("ah ah ah! :p");
}
}
$( function () {
$( "#toc" ).toc( {
Expand Down
6 changes: 5 additions & 1 deletion docs/ScrollMagic_Scene.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,11 @@ <h1 class="page-title">Source: ScrollMagic/Scene.js</h1>

<script>
function openDeeplinkedElement (skipAni) {
$("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
try {
$("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
} catch (e) {
console.warn("ah ah ah! :p");
}
}
$( function () {
$( "#toc" ).toc( {
Expand Down
6 changes: 5 additions & 1 deletion docs/ScrollMagic_Scene_core.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,11 @@ <h1 class="page-title">Source: ScrollMagic/Scene/core.js</h1>

<script>
function openDeeplinkedElement (skipAni) {
$("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
try {
$("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
} catch (e) {
console.warn("ah ah ah! :p");
}
}
$( function () {
$( "#toc" ).toc( {
Expand Down
6 changes: 5 additions & 1 deletion docs/ScrollMagic_Scene_event-management.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,11 @@ <h1 class="page-title">Source: ScrollMagic/Scene/event-management.js</h1>

<script>
function openDeeplinkedElement (skipAni) {
$("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
try {
$("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
} catch (e) {
console.warn("ah ah ah! :p");
}
}
$( function () {
$( "#toc" ).toc( {
Expand Down
6 changes: 5 additions & 1 deletion docs/ScrollMagic_Scene_feature-classToggles.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,11 @@ <h1 class="page-title">Source: ScrollMagic/Scene/feature-classToggles.js</h1>

<script>
function openDeeplinkedElement (skipAni) {
$("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
try {
$("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
} catch (e) {
console.warn("ah ah ah! :p");
}
}
$( function () {
$( "#toc" ).toc( {
Expand Down
6 changes: 5 additions & 1 deletion docs/ScrollMagic_Scene_feature-pinning.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,11 @@ <h1 class="page-title">Source: ScrollMagic/Scene/feature-pinning.js</h1>

<script>
function openDeeplinkedElement (skipAni) {
$("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
try {
$("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
} catch (e) {
console.warn("ah ah ah! :p");
}
}
$( function () {
$( "#toc" ).toc( {
Expand Down
6 changes: 5 additions & 1 deletion docs/ScrollMagic_Scene_getters-setters.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,11 @@ <h1 class="page-title">Source: ScrollMagic/Scene/getters-setters.js</h1>

<script>
function openDeeplinkedElement (skipAni) {
$("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
try {
$("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
} catch (e) {
console.warn("ah ah ah! :p");
}
}
$( function () {
$( "#toc" ).toc( {
Expand Down
6 changes: 5 additions & 1 deletion docs/ScrollMagic__util.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,11 @@ <h1 class="page-title">Source: ScrollMagic/_util.js</h1>

<script>
function openDeeplinkedElement (skipAni) {
$("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
try {
$("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
} catch (e) {
console.warn("ah ah ah! :p");
}
}
$( function () {
$( "#toc" ).toc( {
Expand Down
6 changes: 5 additions & 1 deletion docs/animation.GSAP.html
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,11 @@ <h5>Example</h5>

<script>
function openDeeplinkedElement (skipAni) {
$("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
try {
$("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
} catch (e) {
console.warn("ah ah ah! :p");
}
}
$( function () {
$( "#toc" ).toc( {
Expand Down
6 changes: 5 additions & 1 deletion docs/animation.Velocity.html
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,11 @@ <h5>Example</h5>

<script>
function openDeeplinkedElement (skipAni) {
$("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
try {
$("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
} catch (e) {
console.warn("ah ah ah! :p");
}
}
$( function () {
$( "#toc" ).toc( {
Expand Down
6 changes: 5 additions & 1 deletion docs/classes.list.html
Original file line number Diff line number Diff line change
Expand Up @@ -3030,7 +3030,11 @@ <h5>Example</h5>

<script>
function openDeeplinkedElement (skipAni) {
$("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
try {
$("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
} catch (e) {
console.warn("ah ah ah! :p");
}
}
$( function () {
$( "#toc" ).toc( {
Expand Down
6 changes: 5 additions & 1 deletion docs/debug.addIndicators.html
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,11 @@ <h5>Example</h5>

<script>
function openDeeplinkedElement (skipAni) {
$("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
try {
$("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
} catch (e) {
console.warn("ah ah ah! :p");
}
}
$( function () {
$( "#toc" ).toc( {
Expand Down
6 changes: 5 additions & 1 deletion docs/framework.jQuery.html
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,11 @@ <h3 class="subsection-title">Requires</h3>

<script>
function openDeeplinkedElement (skipAni) {
$("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
try {
$("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
} catch (e) {
console.warn("ah ah ah! :p");
}
}
$( function () {
$( "#toc" ).toc( {
Expand Down
8 changes: 6 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ <h2>Availability</h2><p>To get your copy of ScrollMagic you have the choice betw
<p><strong>Option 1: GitHub</strong><br>Download a zip file containing the source code, demo page, all examples and documentation from the <a href="https://github.com/janpaepke/ScrollMagic/releases">GitHub releases page</a> or clone the package to your machine using the git command line interface:</p>
<pre class="prettyprint source lang-bash"><code>git clone git://github.com/janpaepke/ScrollMagic.git</code></pre><p><strong>Option 2: Bower</strong><br>ScrollMagic is also <a href="http://bower.io/search/?q=scrollmagic">available on bower</a> and will only install the necessary source code, ignoring all example and documentation files.<br>Please mind that since they are not core dependencies, you will have to add frameworks like GSAP, jQuery or Velocity manually, should you choose to use them.</p>
<pre class="prettyprint source lang-bash"><code>bower install scrollmagic</code></pre><p><strong>Option 3: npm</strong><br>If you prefer the <a href="https://www.npmjs.com/package/scrollmagic">node package manager</a>, feel free to use it.<br>Keep in mind that like with bower non-crucial files will be ignored (see above).</p>
<pre class="prettyprint source lang-bash"><code>npm install scrollmagic</code></pre><p><strong>Option 4: CDN</strong><br>If you don't want to host ScrollMagic yourself, you can include it from <a href="https://cdnjs.com/libraries/scrollmagic">cdnjs</a>:</p>
<pre class="prettyprint source lang-bash"><code>npm install scrollmagic</code></pre><p><strong>Option 4: CDN</strong><br>If you don't want to host ScrollMagic yourself, you can include it from <a href="https://cdnjs.com/libraries/ScrollMagic">cdnjs</a>:</p>
<pre class="prettyprint source"><code>http://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.5/ScrollMagic.min.js</code></pre><p>All plugins and uncompressed files are also available on cdnjs.<br>For example:</p>
<pre class="prettyprint source"><code>http://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.5/plugins/debug.addIndicators.js
http://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.5/plugins/debug.addIndicators.min.js</code></pre><h2>Installation</h2><p>Include the <strong>core</strong> library in your HTML file:</p>
Expand Down Expand Up @@ -285,7 +285,11 @@ <h2>Thanks</h2><p>This library was made possible by many people who have support

<script>
function openDeeplinkedElement (skipAni) {
$("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
try {
$("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
} catch (e) {
console.warn("ah ah ah! :p");
}
}
$( function () {
$( "#toc" ).toc( {
Expand Down
6 changes: 5 additions & 1 deletion docs/mixins.list.html
Original file line number Diff line number Diff line change
Expand Up @@ -3030,7 +3030,11 @@ <h5>Example</h5>

<script>
function openDeeplinkedElement (skipAni) {
$("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
try {
$("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
} catch (e) {
console.warn("ah ah ah! :p");
}
}
$( function () {
$( "#toc" ).toc( {
Expand Down
6 changes: 5 additions & 1 deletion docs/namespaces.list.html
Original file line number Diff line number Diff line change
Expand Up @@ -3030,7 +3030,11 @@ <h5>Example</h5>

<script>
function openDeeplinkedElement (skipAni) {
$("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
try {
$("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
} catch (e) {
console.warn("ah ah ah! :p");
}
}
$( function () {
$( "#toc" ).toc( {
Expand Down
6 changes: 5 additions & 1 deletion docs/plugins_animation.gsap.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,11 @@ <h1 class="page-title">Source: plugins/animation.gsap.js</h1>

<script>
function openDeeplinkedElement (skipAni) {
$("dt h4.member-collapsed[id='" + window.location.hash.substring(1).replace(":", "\\:") +"']").trigger("click", skipAni);
try {
$("dt h4.member-collapsed").filter(window.location.hash.substring(1).replace(":", "\\:")).trigger("click", skipAni);
} catch (e) {
console.warn("ah ah ah! :p");
}
}
$( function () {
$( "#toc" ).toc( {
Expand Down
Loading

0 comments on commit c202878

Please sign in to comment.