s9v / pagedown

Automatically exported from code.google.com/p/pagedown
Other
0 stars 0 forks source link

Markdown.Sanitizer.js should not use global window variable #43

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We are trying to use Markdown.Sanitizer.js in Acre (a server-side javascript 
environement).

However, we find ourselves hacking a window object to use Markdown.Sanitizer.js.

But if Markdown.Sanitizer.js passes "this" as the "window" variable, we can use 
Markdown.Sanitizer.js on the server-side as is:

(function(window) {

...

})(this);

Original issue reported on code.google.com by daep...@google.com on 24 Sep 2012 at 2:59