We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b07cc2 commit f83b8bdCopy full SHA for f83b8bd
1 file changed
script.js
@@ -466,7 +466,7 @@ function handleInput() {
466
let content = input.value;
467
468
// content = escapeHTML(content); // yes do put the raw chicken in the salad i love when my app gets xss
469
- content = content;
+ content = replaceInputs(content);
470
let parsedHTML = marked.parse(content);
471
472
// you don't believe how many hours fixing this took (just to comment it out later)
@@ -614,3 +614,10 @@ function appendErrorMessage(message) {
614
errorParagraph.textContent = message;
615
errorOutput.appendChild(errorParagraph);
616
}
617
+
618
+function replaceInputs(text) {
619
+ return inputReplacements.reduce((acc, {
620
+ regex,
621
+ template
622
+ }) => acc.replace(regex, template),text);
623
+}
0 commit comments