Page MenuHomePhabricator
Authored By
Arlolra
Oct 18 2019, 7:41 PM
Size
1 KB
Referenced Files
None
Subscribers
None
diff --git a/lib/ext/Poem/index.js b/lib/ext/Poem/index.js
index 7c93a16f3..a233b0ea6 100644
--- a/lib/ext/Poem/index.js
+++ b/lib/ext/Poem/index.js
@@ -34,11 +34,12 @@ const toDOM = Promise.async(function *(state, content, args) {
.replace(/^(-+)<\/poem>/mg, '$1\n');
}).join('');
// Replace colons with indented spans
- content = content.replace(/^(:+)(.+)$/g, function(match, colons, verse) {
+ content = content.replace(/^(:+)(.+)$/gm, function(match, colons, verse) {
const span = dummyDoc.createElement('span');
span.setAttribute('class', 'mw-poem-indented');
span.setAttribute('style', 'display: inline-block; margin-left: ' + colons.length + 'em;');
- span.appendChild(dummyDoc.createTextNode(verse));
+ // span.appendChild(dummyDoc.createTextNode(verse));
+ span.innerHTML = verse; // FIXME: Is this safe?
return span.outerHTML;
});
}

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
8134430
Default Alt Text
raw.txt (1 KB)

Event Timeline