r63592 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63591‎ | r63592 | r63593 >
Date:11:18, 11 March 2010
Author:jojo
Status:ok
Tags:
Comment:
set attrs of <img> via jQuery to avoid escaping issues
Modified paths:
  • /trunk/extensions/Collection/js/bookcreator.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/js/bookcreator.js
@@ -86,9 +86,10 @@
8787 'rsargs[]': [title]
8888 }, function(result) {
8989 visible = true;
 90+ var img = $('<img />').attr({src: result.img, alt: ''});
9091 addremove_link
91 - .text(result.text)
92 - .prepend('<img src="' + result.img + '" alt="">&nbsp;')
 92+ .text('\u00a0' + result.text)
 93+ .prepend(img)
9394 .unbind('click')
9495 .click(function(e) { addremove_article(result.action, title); });
9596 popup_div

Status & tagging log