diff -r 7b65bf78873a -r eefd336335f9 src/widgets/Annotation.js
--- a/src/widgets/Annotation.js Thu Jan 17 17:25:46 2013 +0100
+++ b/src/widgets/Annotation.js Fri Jan 25 18:16:29 2013 +0100
@@ -76,17 +76,12 @@
return;
}
var title = currentAnnotation.title,
- description = currentAnnotation.description.replace(/(^\s+|\s+$)/g,'');
- if (currentAnnotation.found) {
- var rgxp = _this.source.getAnnotations().regexp || /^$/,
- repl = '$1';
- title = title.replace(rgxp,repl);
- description = description.replace(rgxp,repl).replace(/[\n\r]+/gm,'
');
- }
- _this.$.find(".Ldt-Annotation-Title").html(title || "(" + _this.l10n.untitled + ")");
+ description = currentAnnotation.description.replace(/(^\s+|\s+$)/g,''),
+ rx = (currentAnnotation.found ? (_this.source.getAnnotations().regexp || false) : false);
+ _this.$.find(".Ldt-Annotation-Title").html(IriSP.textFieldHtml(title,rx) || "(" + _this.l10n.untitled + ")");
if (description) {
_this.$.find(".Ldt-Annotation-Description-Block").removeClass("Ldt-Annotation-EmptyBlock");
- _this.$.find(".Ldt-Annotation-Description").html(description);
+ _this.$.find(".Ldt-Annotation-Description").html(IriSP.textFieldHtml(description,rx));
} else {
_this.$.find(".Ldt-Annotation-Description-Block").addClass("Ldt-Annotation-EmptyBlock");
}
@@ -156,7 +151,7 @@
this.insertSubwidget(this.$.find(".Ldt-Annotation-Social"), { type: "Social" }, "socialWidget");
}
- this.insertSubwidget(this.$.find(".Ldt-Annotation-Arrow"), { type: "Arrow" }, "arrow");
+ this.insertSubwidget(this.$.find(".Ldt-Annotation-Arrow"), { type: "Arrow", width: this.width }, "arrow");
this.onMediaEvent("timeupdate",timeupdate);
this.onMdpEvent("Annotation.hide","hide");
this.onMdpEvent("Annotation.show","show");