Browse Source

logs-content: Added escaping of back-ticks (`) to avoid monospace in log posts where a nick containing a back-tick has been copied into the text.

1.2
Gisle Aune 6 years ago
parent
commit
9b4da98ac4
  1. 2
      marko/page/logs-content/components/post/component.js

2
marko/page/logs-content/components/post/component.js

@ -81,7 +81,7 @@ module.exports = class {
this.state.name = input.post.nick
this.state.nameSuffix = ""
this.state.text = input.post.text.replace(/\x02/g, "**").replace(/\x1D/g, "_").trim();
this.state.text = input.post.text.replace(/\x02/g, "**").replace(/\x1D/g, "*").replace(/\`/g, "\\`").trim();
if (this.state.text.startsWith("|")) {
this.state.name = ""

Loading…
Cancel
Save