Commit 92eee85f authored by nashe's avatar nashe Committed by muxator
Browse files

Escape data when listing available plugins

parent 5b1e1f0c
...@@ -79,12 +79,17 @@ $(document).ready(function () { ...@@ -79,12 +79,17 @@ $(document).ready(function () {
for (attr in plugin) { for (attr in plugin) {
if(attr == "name"){ // Hack to rewrite URLS into name if(attr == "name"){ // Hack to rewrite URLS into name
row.find(".name").html("<a target='_blank' title='Plugin details' href='https://npmjs.org/package/"+plugin['name']+"'>"+plugin['name'].substr(3)+"</a>"); // remove 'ep_' var link = $('<a>');
}else{ link.attr('href', 'https://npmjs.org/package/'+plugin['name']);
link.attr('plugin', 'Plugin details');
link.attr('target', '_blank');
link.text(plugin['name'].substr(3));
row.find('.name').append(link);
} else {
row.find("." + attr).text(plugin[attr]); row.find("." + attr).text(plugin[attr]);
} }
} }
row.find(".version").html( plugin.version ); row.find(".version").text(plugin.version);
row.addClass(plugin.name) row.addClass(plugin.name)
row.data('plugin', plugin.name) row.data('plugin', plugin.name)
container.append(row); container.append(row);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment