diff --git a/src/sbbs3/js_global.c b/src/sbbs3/js_global.c index ba9e1c9821cb4b5f107af34e83d85c1b6baad6b1..2c622b5e690a89383ae2eb3bcd31289f97dcd61d 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);