From 07673f07262a3e742b06d886b23a2969a6abe58a Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Wed, 12 Oct 2016 13:14:59 +0800 Subject: [PATCH] Fix note extract tags might get encoded HTML entity --- lib/models/note.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/models/note.js b/lib/models/note.js index 7fdc564..05ed04c 100644 --- a/lib/models/note.js +++ b/lib/models/note.js @@ -285,7 +285,7 @@ module.exports = function (sequelize, DataTypes) { if (/^tags/gmi.test($(value).text())) { var codes = $(value).find("code"); for (var i = 0; i < codes.length; i++) { - var text = $(codes[i]).html().trim(); + var text = S($(codes[i]).text().trim()).stripTags().s; if (text) rawtags.push(text); } }