mdevils/html-entities

Formatting Error

knoxcard opened this issue · 2 comments

Code

var cart_product_name = '&#34Royal OG&#34 (Private Reserve) NEW'
cart_product_name = require('html-entities').AllHtmlEntities.decode(cart_product_name)

INPUT: &#34Royal OG&#34 (Private Reserve) NEW'
OUTPUT: '' OG" (Private Reserve) NEW'

Why is "Royal" being completely wiped out?

I did fix this by adding this code before it, guess the semicolons are required?

cart_product_name = cart_product_name.replace(/&#39/g, ''').replace(/&#34/g, '"').replace(/&amp/g, '&')

Hello @knoxcard, sorry for a delay in the response.

Your case was fixed in 2.0.1.