kphp icon indicating copy to clipboard operation
kphp copied to clipboard

Add support for `htmlspecialchars` features

Open alexanderteplov opened this issue 2 years ago • 0 comments

  1. Starting from version 5.4 PHP supports predefined constant ENT_HTML5 used as a flag for htmlspecialchars. This constant is currently unsupported by the compiler, given the following error: Compilation error at stage: Inline defines pass, gen by inline-defines-usages.cpp:38.

  2. From the same (or close) version PHP supports 4 arguments for htmlspecialchars (currently only 2 supported). See php.net/manual/en/function.htmlspecialchars.php

It would be nice of you to support both of these things to allow such constructions: htmlspecialchars($string, ENT_HTML5, 'CP-1251', false).

The example of code above is essential to support such languages as Chinese or Japanese for elephize for WEB. Contact me if you need more details.

alexanderteplov avatar Feb 06 '23 16:02 alexanderteplov