mirror of
https://github.com/e107inc/e107.git
synced 2025-08-13 10:04:35 +02:00
e_parse::toAttributes()
: New API to concatenate HTML attributes
`e_parse::toAttributes()` is an expansion of the formerly private method `e_form::attributes()`. Now, all client code can use `e_parse::toAttributes()` to make it easy to concatenate variable-length HTML attributes. Values are guaranteed to be encoded so that they cannot escape an HTML attribute value. All client code usages are encouraged to build HTML tags with this new method to prevent cross-site scripting (XSS) attacks and prevent breaking the HTML validity due to improperly escaped HTML attributes. This new method is an extension to `e_parse::toAttribute()`, which escaped one single HTML attribute value.
This commit is contained in: