Skip to content

Node.js based forum software built for the modern web

closes #1814

psychobunny1d8aeda9c228
diff --git a/src/topics/tags.js b/src/topics/tags.js
index a3d3738a02..fd6e7385ab 100644
--- a/src/topics/tags.js
+++ b/src/topics/tags.js
@@ -39,7 +39,8 @@ module.exports = function(Topics) {
return '';
}
tag = tag.trim().toLowerCase();
- tag = tag.replace(/[,\/#!$%\^&\*;:{}=_`<>'"~()?\|]/g, '');
+ tag = tag.replace(/&/g, '&amp;');
+ tag = tag.replace(/[,\/#!$%\^\*;:{}=_`<>'"~()?\|]/g, '');
tag = tag.substr(0, meta.config.maximumTagLength || 15);
var matches = tag.match(/^[.-]*(.+?)[.-]*$/);
if (matches && matches.length > 1) {