web/res/metadataplayer/Annotation.js
changeset 726 d82d070cf23e
parent 719 d0d3a9369f84
child 778 525f00c2d6ac
--- a/web/res/metadataplayer/Annotation.js	Wed Nov 28 18:33:32 2012 +0100
+++ b/web/res/metadataplayer/Annotation.js	Tue Dec 04 10:56:04 2012 +0100
@@ -81,7 +81,7 @@
             var rgxp = _this.source.getAnnotations().regexp || /^$/,
                 repl = '<span class="Ldt-Annotation-Highlight">$1</span>';
             title = title.replace(rgxp,repl);
-            description = description.replace(rgxp,repl);
+            description = description.replace(rgxp,repl).replace(/[\n\r]+/gm,'<br />');
         }
         _this.$.find(".Ldt-Annotation-Title").html(title || "(" + _this.l10n.untitled + ")");
         if (description) {
@@ -100,6 +100,7 @@
             _text = _this.l10n.watching + _annotation.title + (_this.site_name ? _this.l10n.on_site + _this.site_name : ''),
             _tags = _annotation.getTags(),
             _tagblock = _this.$.find(".Ldt-Annotation-Tags");
+        _tagblock.empty();
         if (_tags.length) {
             _this.$.find(".Ldt-Annotation-Tags-Block").removeClass("Ldt-Annotation-EmptyBlock");
             _tags.forEach(function(_tag) {