From 9bdbe297a3b4e4eab2bb9f203dc8395724c01464 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Fri, 26 Feb 2016 07:19:55 +0000
Subject: [PATCH] Added HTML to ASCII conversions for entities: lsquo/rsquo
 (single-quote), ldquo/rdquo (double-quotes), and ndash/mdash (dash).

---
 src/sbbs3/js_global.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/sbbs3/js_global.c b/src/sbbs3/js_global.c
index ba9e1c9821..2c622b5e69 100644
--- a/src/sbbs3/js_global.c
+++ b/src/sbbs3/js_global.c
@@ -2316,6 +2316,21 @@ js_html_decode(JSContext *cx, uintN argc, jsval *arglist)
 			continue;
 		}
 
+		if(strcmp(token,"lsquo")==0 || strcmp(token,"rsquo")==0) {
+			outbuf[j++]='\'';	/* single quotation mark */
+			continue;
+		}
+
+		if(strcmp(token,"ldquo")==0 || strcmp(token,"rdquo")==0) {
+			outbuf[j++]='"';	/* double quotation mark */
+			continue;
+		}
+
+		if(strcmp(token,"ndash")==0 || strcmp(token,"mdash")==0) {
+			outbuf[j++]='-';	/* dash */
+			continue;
+		}
+
 		/* Unknown character entity, leave intact */
 		j+=sprintf(outbuf+j,"&%s;",token);
 		
-- 
GitLab