1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

588 Commits

Author SHA1 Message Date
Cameron
038d88aa2a Lazy loading added to bbcode images and avatar images by default. 2021-10-26 14:57:01 -07:00
Cameron
7755dd1743 Added option for themes to load only the css or js portion of a library via theme.xml attribute. See bootstrap5/theme.xml for an example.
Empty comments in glyphs removed due to conflict with Fontawesome JS. Tests updated.
2021-10-11 12:33:59 -07:00
Nick Liu
19f48180dc
Restore htmlspecialchars() for e_parse::filter(…, 'str')
Fixes regression from 20882920a0b68937570264949512acc0c4841dbd where
data would get inserted into the database with literal quotation marks,
but e107 has always expected `"` and `'` to come directly from
the database
2021-10-06 13:06:31 -05:00
Cameron
5ecc0beca6 Issue #6 LANS added. Clear system cache before checking for updates. Extra checks to e_parse to avoid possible errors. 2021-09-28 08:13:27 -07:00
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
Nick Liu
20882920a0
Fix all PHP 8.1 test failures
* `strftime()` has been replaced with a polyfill based on `DateTime`.
* Explicit type casts/assertions added where required by PHP 8.1
* `filter_var(…, FILTER_SANITIZE_STRING)` replaced with `strip_tags()`
  or HTML entity encoding of quotation marks, depending on a guess of
  what the intended "sanitization" was
* `http_build_query()` usage type mismatches fixed
* Removed usages of the `FILE_TEXT` constant
* To avoid breaking PHP 5.6 compatibility (function return types),
  `e_session_db` no longer implements `SessionHandlerInterface`.
  Instead, the alternative non-OOP invocation of
  `session_set_save_handler()` is used instead to apply the session
  handler.
* The shim for `strptime()` still calls the native function if available
  but now suppresses the deprecation warning.

* `e_db_pdo` explicitly asks for `PDO::ATTR_STRINGIFY_FETCHES` to
  maintain consistent behavior with past versions of PHP.
* `e_db_mysql` explicitly sets `mysqli_report(MYSQLI_REPORT_OFF)` to
  maintain consistent behavior with past versions of PHP.

* Removed pointless random number generator seed from `banner` plugin
* Workaround for `COUNT(*)` SQL query in
  `validatorClass::dbValidateArray()` without a proper API for avoiding
  SQL injection
2021-09-04 15:06:19 +02:00
Cameron
c4f76c3687 Issue #4270 - perform all webp conversion checks within e_thumbnail class. WebP conversion now works with SEF media URLS. 2021-06-18 09:31:45 -07:00
Cameron
7302803a75 Issue #4270 Added .webp browser-support detection. Media-Manager "Convert to webp during render" can now be safely enabled and will temporarily fallback to the regular image if the browser does not support webp images. 2021-06-18 08:43:53 -07:00
Cameron
1ae7e3a2ed Bootstrap5 fix for video ratio. 2021-06-03 13:45:07 -07:00
Nick Liu
ce7f3b5d56
Add: e_parse::toFlatArray() and e_parse::fromFlatArray()
Utility functions to convert multi-dimensional arrays to slash-delimited
single-dimensional arrays and vice versa
2021-04-17 02:56:12 -05:00
Cameron
8f7ab86413 Fixes #4486 - Invalid attributes not being fully filtered. 2021-04-12 11:13:37 -07:00
Cameron
444d8d6dc0 Issue #4486 - iframe accepted attributes updated 2021-04-12 11:01:58 -07:00
Cameron
cb95b4b243 Hero cleanup for Bootstrap5. Switched to placeholder images. Admin-ui type 'image' now loads remote URLs correctly. 2021-02-26 10:13:07 -08:00
Cameron
46b6927447 Fixes #4403 - Parsing of [code]. Test added. 2021-02-19 16:07:12 -08:00
Cameron
49932534da Installation tweaks/fixes. 2021-02-05 19:57:53 -08:00
Cameron
2337b075a8 Fixes #4346 - TinyMce parser issue. Hide side-panel help icon on legacy admin theme. 2021-02-05 18:31:54 -08:00
Cameron
d1f997ee2c Fix for multi-dimensional field saving. 2021-02-02 16:09:22 -08:00
Cameron
0b1a84068f toGlyph() additional tests, Media-Manager includes bootstrap5 when detected and backward compatibility. 2021-01-31 13:09:53 -08:00
Cameron
2dedc8719f FontAwesome 5 added to admin area and bootstrap3 theme. $tp->toIcon() supports SVG sizing 2x, 3x etc. 2021-01-30 19:21:23 -08:00
Cameron
17a9aa2822 New e107::isCompatible() method added for checking plugins/themes are compatible with the current version of e107.
New parser method stripBlockTags($html) to remove p, div etc.
{CPAGEBODY: strip=blocks} shortcode option added (uses the method above)
2021-01-23 14:20:51 -08:00
Cameron
b19f9ffbc3 Frontend scripts tests. (may break some things) 2021-01-19 18:52:56 -08:00
Cameron
f091709847 Issue #4352 - Canonical added for page, forum and download. Replaced some e_PAGETITLE with e107::title() 2021-01-19 09:50:02 -08:00
Cameron
809146ef6a Removed a method specific to PHP versions earlier than 5.4 . Additional parser tests added. 2021-01-18 10:27:41 -08:00
Cameron
419a0e727a Fix for HTML used on text_truncate(). Ignore setcookie() in CLI mode. 2021-01-18 07:40:17 -08:00
Cameron
b94acc09e2 More parser tests. 2021-01-15 14:24:28 -08:00
Cameron
14fac98f56 toHTML modifier processing moved to a new method. 2021-01-15 13:20:38 -08:00
Cameron
136093b4de toHTML modifiers test added. 2021-01-15 12:47:26 -08:00
Cameron
497e7279b6 toHTML modifiers extracted to new method. 2021-01-15 10:59:52 -08:00
Cameron
13517e83a8 Multibyte utf8 method tests and fixes. 2021-01-15 09:03:07 -08:00
Cameron
8cfb8d80cc e_parse cleanup 2021-01-14 18:30:32 -08:00
Cameron
2dac1ef3a4 Merged e_parse and e_parser classes 2021-01-14 17:32:08 -08:00
Cameron
d51f5cb936 Legacy textparse class removed. Separate emote and profanity classes. 2021-01-14 17:26:15 -08:00
Cameron
1a3054c041 Removed old code from parser. 2021-01-14 14:50:16 -08:00
Cameron
62d6341303 Bbcode test and parser cleanup. 2021-01-14 14:46:49 -08:00
Cameron
ca471b31db PHP8 Fix for search.php . e_HTTP fix for CLI mode. 2021-01-13 11:20:58 -08:00
Cameron
c8ba5fe30a Shortcode tests for list_new, pm, rss_menu, signin and simpleParse() 2021-01-08 17:00:23 -08:00
Cameron
ac9c19bae9 PHP8 class cleanup 2021-01-06 11:52:29 -08:00
Cameron
f0ce3ac4a9 PHP8 Fixes. RSS speed improvement. 2021-01-05 16:40:01 -08:00
Cameron
661fd6fb2c Test for toRss() 2021-01-05 10:36:58 -08:00
Cameron
f9492a8c89 Issue #4332 - Bootstrap5 fix for toBadge() 2021-01-03 11:01:54 -08:00
Cameron
14862f0463 PHP8 Warning removal. 2021-01-01 10:45:26 -08:00
Cameron
a09e8605c5 Fix typo in isImage() 2020-12-31 15:00:12 -08:00
Cameron
515d81ebb7 Sigin plugin/shortcode added. 2020-12-30 14:24:38 -08:00
Cameron
3ad4964b2d BS5 fixes. 2020-12-30 07:57:43 -08:00
Cameron
21e3c3f8ab PHP warning fixes. 2020-12-29 09:48:36 -08:00
Cameron
7dfac0dcfa Issue #4299 - PHP8 compatibility fixes. 2020-12-25 10:23:56 -08:00
Cameron
881670d92c Catch any debugger errors that could occur during Github sync. Added more deprecated items to the log. 2020-12-22 09:59:39 -08:00
Cameron
630f3f415f Improved detection of deprecated functions/methods and display in DEBUG mode: deprecated. 2020-12-21 10:00:28 -08:00
Cameron
78665cd56d Performance: Reduced e107::getFolder() usage from 2500+ to less than 30. 2020-12-21 06:41:45 -08:00
Cameron
bdb4104f9c Moved parseheader() to e107 class as renderLayout() Added test. 2020-12-20 13:25:03 -08:00