1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-13 10:04:35 +02:00

6 Commits

Author SHA1 Message Date
Nick Liu
f6d6d1b185 Deprecate e_parse::toJS()
`e_parse::toJS()`, documented with the description

> Convert text blocks which are to be embedded within JS

, does not protect strings from injections, which appears to be its
primary use.  Additionally, it performs multiple unrelated string
modifications:

* Replace Windows line breaks with a literal `\\n` (which would later be
  parsed as `\n` in JavaScript/JSON)
* Does not modify Unix line breaks (`\n`), which is inconsistent with
  the Windows line break behavior
* Removes HTML tags
* Replaces HTML entities as `htmlentities()` does

This method cannot be fixed because its usages are inconsistent.  Most
notably, some usages surround the method's output in single quotes while
others surround it with double quotes.  Strings cannot be JSON-encoded
without confounding quotation mark styles.

All core usages of `e_parse::toJS()` have been replaced with
alternatives, which are also documented in the method's DocBlock.

Fixes: #4546
2021-08-31 00:11:14 +02:00
Cameron
a7d8b1d41f Styling Rules Menus: btn-sm and btn-primary for primary buttons. btn-sm btn-secondary for additional buttons. 2021-01-02 09:43:54 -08:00
Cameron
e1593de8ee Removed redundant PHP closing tags. 2020-08-10 15:49:44 -07:00
Deltik
1f824faa69 Renormalized all text file line endings 2019-03-29 19:13:32 -05:00
Cameron
b40b1916a3 Issue #2970 btn-default > btn-default btn-secondary 2018-01-10 15:06:40 -08:00
Cameron
246116c1e2 Newsletter menu renamed to newsletter_legacy_menu.php in preparation for new menu. 2016-06-27 17:17:31 -07:00