13 lines
366 B
JavaScript
13 lines
366 B
JavaScript
// Test HTML entity decoding
|
|
const text = 'bg_image=”45569″';
|
|
console.log('Original:', text);
|
|
|
|
// The file has literal ” and ″ characters
|
|
// But we need to decode them to "
|
|
const decoded = text
|
|
.replace(/”/g, '"') // ” -> "
|
|
.replace(/″/g, '"'); // ″ -> "
|
|
|
|
console.log('Decoded:', decoded);
|
|
console.log('Match:', decoded === 'bg_image="45569"');
|