joeistas / heroes-parser

Parse Heroes of the Storm game data into JSON
4 stars 1 forks source link

Don't escape unicode characters in tooltip strings #2

Closed pastelmind closed 6 years ago

pastelmind commented 6 years ago

Currently, all unicode characters in locale text (e.g. tooltip string) are auto-escaped to HTML entities.

Example)

"button": {
    "id": "GarroshGroundbreaker",
    "name": "대지파괴자",
    "tooltip": {
        "localeText": {
            "kokr": "&#xC77C;&#xC815; &#xC9C0;&#xC5ED; &#xC548;&#xC758; &#xC801;&#xB4E4;&#xC5D0;&#xAC8C; <span>{{ formula0 }}</span>&#xC758; &#xD53C;&#xD574;&#xB97C; &#xC90D;&#xB2C8;&#xB2E4;. &#xC678;&#xACFD;&#xC758; &#xC801;&#xB4E4;&#xC740; <span>{{ formula1 }}</span>&#xCD08; &#xB3D9;&#xC548; &#xAE30;&#xC808;&#xD55C; &#xD6C4; <span>{{ formula2 }}</span>&#xCD08; &#xB3D9;&#xC548; <span>{{ formula3 }}</span> &#xB290;&#xB824;&#xC9D1;&#xB2C8;&#xB2E4;."
        }
        //...
    }
    //...
}

Desired output:

"button": {
    "id": "GarroshGroundbreaker",
    "name": "대지파괴자",
    "tooltip": {
        "localeText": {
            "kokr": "일정 지역 안의 적들에게 <span>{{ formula0 }}</span>의 피해를 줍니다. 외곽의 적들은 {{ formula1 }}초 동안 기절한 후 <span>{{ formula2 }}</span>초 동안 <span>{{ formula3 }}</span> 느려집니다."
        }
        //...
    }
    //...
}

I assume this has something to do with Handlebars. Can the auto-escaping behavior be disabled?

joeistas commented 6 years ago

This should be fixed in version 1.0.10.