summaryrefslogtreecommitdiffstats
path: root/web/dom.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/dom.js')
-rw-r--r--web/dom.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/web/dom.js b/web/dom.js
index ba11827..8e0e257 100644
--- a/web/dom.js
+++ b/web/dom.js
@@ -3,12 +3,16 @@
* See LICENSE file for license details
*/
-define(["acf2/navigation", "jquery"], function(navi, $) {
+define(["acf2/navigation", "jquery", "underscore"], function(navi, $, _) {
function href() {
return $("<a>").attr({href: "javascript:void(0);"});
}
return {
+ setText: function(el, s) {
+ el.html(_.map(s.split("\n"), _.escape).join("<br/>"));
+ },
+
href: href,
objectRef: function(value, el) {