Commit
Start using a commonjs fork of Sanitize.js
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[submodule "deps/Sanitize.js"] | ||
path = deps/Sanitize.js | ||
url = https://github.com/gbirke/Sanitize.js.git | ||
url = https://github.com/thedod/Sanitize.js.git | ||
[submodule "deps/jwysiwyg"] | ||
path = deps/jwysiwyg | ||
url = https://github.com/akzhan/jwysiwyg.git |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../deps/Sanitize.js/lib |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../deps/jwysiwyg |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<h1>404 - Not Found :(</h1> | ||
<h3>404 - Not Found :(</h3> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,10 @@ | ||
<script src="{baseURL}/static/js/sanitize_js/sanitize.js"></script> | ||
<script src="{baseURL}/static/js/sanitize_js/sanitize/config/relaxed.js"></script> | ||
<script type="text/javascript"> | ||
// Add nofollow and _blank to all links coming from user input | ||
Sanitize.Config.RELAXED.add_attributes={a:{rel:'nofollow', target:'_blank'}}; | ||
</script> | ||
|
||
<h1>{title}</h1> | ||
<div id="post-body"> | ||
<img src="{baseURL}/static/images/spinner-small.gif"> | ||
<noscript> | ||
<h3 style="direction:ltr">Html-quoted content (turn javascript on to view sanitized html):</h3> | ||
<p style="direction:ltr">{text}</p> | ||
</noscript> | ||
</div> | ||
<script type="text/javascript"> | ||
$(function() { | ||
$('#post-body').html(new Sanitize(Sanitize.Config.RELAXED).clean_node( | ||
$('<span>'+unescape('{escaped}').replace(/<script/gi,'<script')+'</span>').get(0) | ||
)); | ||
}); | ||
window.escaped_post='{escaped|s}'; | ||
</script> | ||
|
||
<div id="actions"> | ||
<form method="POST" action="{basurl}/delete/{_id}"> | ||
<a href="{baseURL}/edit/{_id}">Edit</a> | ||
<input type="submit" value="Delete"> | ||
</form> | ||
</div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<div id="actions"> | ||
<form method="POST" action="{basurl}/delete/{_id}"> | ||
<a href="{baseURL}/edit/{_id}">Edit</a> | ||
<input type="submit" value="Delete"> | ||
</form> | ||
</div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,6 @@ | ||
<h1><a href="{baseURL}/{id}">{form_title}</a></h1> | ||
{>"flashmessages.html"/} | ||
<link rel="stylesheet" href="{baseURL}/static/jwysiwyg/jquery.wysiwyg.css" type="text/css"/> | ||
<script type="text/javascript" src="{baseURL}/static/jwysiwyg/jquery.wysiwyg.js"></script> | ||
<script type="text/javascript" src="{baseURL}/static/jwysiwyg/controls/wysiwyg.link.js"></script> | ||
<script type="text/javascript" src="{baseURL}/static/jwysiwyg/controls/wysiwyg.image.js"></script> | ||
<script type="text/javascript" src="{baseURL}/static/wysiwyg_controls.js"></script> | ||
|
||
<form method="POST" action=""> | ||
<table> | ||
{form|s} | ||
</table> | ||
<input type="submit" value="{button_label}" /> | ||
</form> | ||
|
||
<script type="text/javascript"> | ||
$(function() { | ||
$('#id_text').wysiwyg({ | ||
controls:window.wysiwyg_controls, | ||
{?config.rtl}css: {direction:'rtl'},{/config.rtl} | ||
initialContent:'' | ||
}); | ||
$('#id_title').focus(); | ||
}); | ||
</script> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,3 @@ | |
{:else} | ||
<p>No blog posts</p> | ||
{/rows} | ||
|
||
<div id="actions"> | ||
<a href="{baseURL}/add">Add new</a> | ||
</div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<a href="{baseURL}/add">Add new</a> |