' -> ' // this case is covered it the function below.
& -> &
.replace(/ +/g, ' ');
function parseHtmlEntities(str) {
return str.replace(/&#([0-9]{1,3});/gi,(match, numStr) => {
var num = parseInt(numStr, 10); // read num as normal number
return String.fromCharCode(num);
});
}
abstract: 'Disclosed are compositions and formulations comprising or consisting of, for example, N, N' -dimethyl 3, 4-dimethoxy-beta-phenylethylamine and/or a pharmacologically acceptable salt thereof, and methods use of said compositions and formulations, e.g. , to reduce caloric intake in a mammal.'
},
'US-5668131-A': {
title: 'Substituted aminoalkylaminopyridines',
abstract: 'PCT No. PCT/EP94/03911 Sec. 371 Date May 31, 1996 Sec. 102(e) Date May 31, 1996 PCT Filed Nov. 26, 1994 PCT Pub. No. WO95/15324 PCT Pub. Date Jun. 8, 1995Compounds of formula I <IMAGE> (I) wherein R1, R2, R3, R4, R5, R6, X, n and A have the meanings as given in the description, can be used for combatting Helicobacter bacteria.'
},
You could decode HTML (XML) entities for the abstract (at least, maybe the title as well).
you could use:
https://www.npmjs.com/package/he/v/1.2.0
Or do it manually using those urles
abstract: 'Disclosed are compositions and formulations comprising or consisting of, for example, N, N' -dimethyl 3, 4-dimethoxy-beta-phenylethylamine and/or a pharmacologically acceptable salt thereof, and methods use of said compositions and formulations, e.g. , to reduce caloric intake in a mammal.' },
'US-5668131-A': { title: 'Substituted aminoalkylaminopyridines', abstract: 'PCT No. PCT/EP94/03911 Sec. 371 Date May 31, 1996 Sec. 102(e) Date May 31, 1996 PCT Filed Nov. 26, 1994 PCT Pub. No. WO95/15324 PCT Pub. Date Jun. 8, 1995Compounds of formula I <IMAGE> (I) wherein R1, R2, R3, R4, R5, R6, X, n and A have the meanings as given in the description, can be used for combatting Helicobacter bacteria.' },