Permalink
Browse files

Merge commit 'drmeers/master'

  • Loading branch information...
2 parents 48e6328 + fd7511b commit a62a9977991f07618d3adeaa10dae18ceddc1b9c @digi604 digi604 committed Oct 7, 2009
Showing with 3 additions and 2 deletions.
  1. +2 −1 cms/plugins/text/templates/cms/plugins/widgets/widget_lib.js
  2. +1 −1 cms/plugins/text/utils.py
@@ -36,7 +36,7 @@ function add_plugin(type, parent_id, language){
function edit_plugin(obj_id) {
editPluginPopupCallbacks[obj_id] = function(plugin_id, icon_src, icon_alt){
var texteditor = get_editor("{{ name }}");
- var rExp = new RegExp('<img src="[^>]*" alt="[^>]*" id="plugin_obj_' + obj_id + '"[^>]*>', "g");
+ var rExp = new RegExp('<img[^>]* id="plugin_obj_' + obj_id + '"[^>]*>', "g");
try {
texteditor.replaceContent(rExp, plugin_admin_html(plugin_id, icon_src, icon_alt));
} catch (e) {}
@@ -56,6 +56,7 @@ function edit_plugin(obj_id) {
function plugin_admin_html(plugin_id, icon_src, icon_alt) {
return '<img src="' + escapeHtml(icon_src) + '" ' +
'alt="'+ escapeHtml(icon_alt) + '" ' +
+ 'title="'+ escapeHtml(icon_alt) + '" ' +
'id="plugin_obj_' + plugin_id + '"/>';
}
@@ -18,7 +18,7 @@ def _tag_to_admin(m):
# end user, or edited, so just remove it from the HTML
# altogether
return u''
- return u'<img src="%(icon_src)s" alt="%(icon_alt)s" id="plugin_obj_%(id)d" />' % \
+ return u'<img src="%(icon_src)s" alt="%(icon_alt)s" title="%(icon_alt)s" id="plugin_obj_%(id)d" />' % \
dict(id=plugin_id,
icon_src=force_escape(obj.get_instance_icon_src()),
icon_alt=force_escape(obj.get_instance_icon_alt()),

0 comments on commit a62a997

Please sign in to comment.