aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2020-01-07 10:30:22 -0500
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2020-01-07 10:30:22 -0500
commit8567deb76bd68a039d3160a9623998bd91ab46bd (patch)
tree7cf8a88ce81b3288036ed4d5c8c56ef7a6b628a7
parent5be1b3cc78358abd45376b05e9d59fecb67402f8 (diff)
downloadpatchfoo-8567deb76bd68a039d3160a9623998bd91ab46bd.tar.gz
patchfoo-8567deb76bd68a039d3160a9623998bd91ab46bd.zip
Decode HTML entities in mentions
-rw-r--r--lib/serve.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/serve.js b/lib/serve.js
index 034915c..cf9357e 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -3836,6 +3836,10 @@ Serve.prototype.composer = function (opts, cb) {
}
var mentions = ssbMentions(data.text, {bareFeedNames: true, emoji: true})
.filter(function (mention) {
+ if (typeof mention.name === 'string') {
+ mention.name = mention.name
+ .replace(/&#39;/g, "'")
+ }
if (mention.emoji) {
mention.link = formEmojiNames[mention.name]
if (!mention.link) {