Files
klz-cables.com/test-decode2.js
2025-12-30 16:19:42 +01:00

16 lines
483 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Test decoding actual HTML entities from file
const text = 'bg_image=”45569″';
console.log('Original:', text);
// Decode decimal HTML entities
const decoded = text
.replace(/”/g, '"') // ” -> "
.replace(/″/g, '"') // ″ -> "
.replace(/“/g, '"') // “ -> "
.replace(//g, "'") // -> '
.replace(//g, "'") // -> '
.replace(//g, '-'); // -> -
console.log('Decoded:', decoded);
console.log('Match:', decoded === 'bg_image="45569"');