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

5383 Commits

Author SHA1 Message Date
Cameron
f5dbec04ed Issue #4610 - Possible BC fix for outdated html attributes. 2021-11-24 11:07:52 -08:00
Nick Liu
31ea9bf787
CI: Try to fix intermittent failures on e_parse::toImage()
Perhaps the first argument to `debug_backtrace()` should be `0` instead
of the default?
2021-11-23 16:30:30 -06:00
Nick Liu
fb420ccfb1
PHP 8.1: Fix some more null value issues
* `e_form::attributes()`
* `e_parse::toImage()`
2021-11-23 13:57:38 -06:00
Cameron
fea46ed7ee Fixes #4605 - Custom home icon support and fallback icon for non-FontAwesome breadcrumbs. 2021-11-17 15:21:10 -08:00
Cameron
db6035f844 Experimental embedding of FA svg. 2021-11-15 13:51:01 -08:00
Cameron
35808e5eb9 Issue #4609 - Was still failing in earlier PHP versions. More tests added. 'empty' attribute added to news_render_type 2021-11-04 13:58:05 -07:00
Cameron
54cb89b87d Fix for <title> tag containing single or double quotes. Tests added. 2021-11-03 13:55:56 -07:00
Cameron
6d5b4f5c3a Moved experimental e_ROUTE constant to registry. 2021-11-01 15:46:39 -07:00
Cameron
7930aba4ca Fixes #4609 - Quick fix for inconsistent drop-down behavior PHP7 -> PHP8. 2021-11-01 14:41:40 -07:00
Cameron
038d88aa2a Lazy loading added to bbcode images and avatar images by default. 2021-10-26 14:57:01 -07:00
Cameron
723974a0ba Fix for poorly formatted text emails derived from html tables. 2021-10-25 09:34:13 -07:00
Cameron
b91b1c36b0 Closes #4600, Fixes #4597 - Encoding of 'national characters' in TinyMce. 2021-10-19 09:10:32 -07:00
Cameron
fe7e99f136 Fixed formatting of admin > mailout form elements. 2021-10-19 07:41:33 -07:00
Cameron
d6b0391a2d Fixed corruption of carousel attributes and other 'data-' keys. Test added. 2021-10-14 08:08:43 -07:00
Cameron
78d72fa139 Added 'defer' to bootstrap5 and fontawesome5 <script> tags. 2021-10-12 08:00:41 -07:00
Cameron
0442ba138a addJs() method cleanup. Work-in-progress. 2021-10-11 19:06:03 -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
Cameron
fd116c177a Meta PHP warnings fix. 2021-10-10 09:03:07 -07:00
Nick Liu
840e818f40
e_form: Allow HTML attribute "value" keys with blank values
Otherwise, something like `<option>Nope</option>` will get a value of
"Nope" instead of "" as in `<option value=''>Nope</option>`.
2021-10-08 18:03:44 -05:00
Nick Liu
2fa9d10c57
e_form: Handle attribute HTML entities properly for most form elements
The result is a much more consistent form experience with less fear that
some values put into an `e_form` method will break the web page.

This commit covers the most common uses of `e_form` with HTML attribute
quoting via `e_form::attributes()`.
2021-10-06 20:14:51 -05:00
Nick Liu
2080c772c1
Simplify e_form::get_attributes()
Reduce code duplication without changing behavior

Introduce helper `e_form::attributes()` to generate HTML attributes
2021-10-06 13:07:30 -05: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 `&quot;` and `&#39;` to come directly from
the database
2021-10-06 13:06:31 -05:00
Cameron
d4d0a74858 Make sure to use property attribute on og:type 2021-10-06 07:34:28 -07:00
Cameron
e5b139e91a Set og:url and twitter:url when e107::canonical is called. Twitter card meta added to news posts and pages. 2021-09-29 18:43:20 -07: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
Cameron
c15adc1f20 Intervention updated to v2.6.1
PHPMailer updated to v6.5.1
2021-09-27 10:48:29 -07:00
Cameron
320287f6ad Fix PHP error on some legacy themes that are missing meta-data. e107_tests composer update. 2021-09-27 10:45:06 -07:00
Cameron
3a241727f8 Keep FB scraper up-to-date with changes. 2021-09-24 13:19:06 -07:00
Cameron
c7be6a57e8 Open-graph improvements in news. 2021-09-24 13:08:45 -07:00
Nick Liu
45bce2a7aa
#4572: e_form: No htmlspecialchars() on "other" attributes
Fixes: #4572

Discussion:
https://github.com/e107inc/e107/pull/4554#issuecomment-926113601
2021-09-23 16:12:52 -05:00
Cameron
171cac87b1 Admin-UI type=datestamp and batch=true was producing unexpected results in the batch filter. Now provides an option for setting the current date/time. 2021-09-23 12:37:30 -07:00
Cameron
45bb6c2f35 Custom meta-image option added to Pages. 2021-09-23 12:01:26 -07:00
Cameron
a8ec6435e5 Closes #4567 - jQuery 3 is now the default for the frontend of e107.
To use v2, add the following to e107_config.php: define('e_DEBUG_JQUERY', 2);
2021-09-23 11:02:43 -07:00
Cameron
94c5761893 Updated jQuery3 CDN URL. Reduced some scrollbar widths in admin area. Prevent multiple og:title entries. 2021-09-23 10:41:51 -07:00
Cameron
d0f8f348fe Removed cacheID from cached JS/CSS URLs - now automatically included within filename hash. 2021-09-15 19:25:10 -07:00
Cameron
4747ad3c6e
Merge pull request #4547 from Deltik/fix/4546
Deprecate `e_parse::toJS()`
2021-09-15 12:18:41 -07:00
Cameron
632f33526f Admin-ui: Fix for delete confirmation popup alert. 2021-09-14 14:15:30 -07:00
Cameron
48ace946f4 Bootstrap upgraded to v5.1.1 2021-09-13 18:05:35 -07:00
Nick Liu
c94722e00b
#4564: Un-break validatorClass::dbValidateArray() counter
I forgot an `AND` in the `WHERE` clause for the `e_db_pdo`
implementation of `validatorClass::dbValidateArray()`.

Fixes: https://github.com/e107inc/e107/issues/4564
2021-09-13 12:41:26 -05: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
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
f173b59672 Closes #4539 2021-08-13 10:58:42 -07:00
Cameron
b994dd916d Bootstrap upgraded to v5.1.0 2021-08-13 10:03:24 -07:00
Cameron
32618817d1 Character counting display added to meta description on admin News and Page inputs. 2021-08-12 11:51:55 -07:00
Cameron
64e705ced0 {SITELINKS_ALT} fix and test. 2021-08-07 12:26:23 -07:00
Nick Liu
ecf6ab7acc
show_emessage("ALERT", …): JSON type enforcement for alert() usages 2021-08-07 18:50:14 +02:00
Nick Liu
7a04260b5f
#4299: Wrap even more potentially undefined constants
In:
* Admin-UI
* Forums
2021-07-21 20:23:06 +02:00
Cameron
389a76efe2 Fix for active nav detection while SEF URL in use. 2021-07-15 17:51:08 -07:00
Cameron
ebe9c8cf13 Precaution to avoid fatal error with some admin-ui configurations. Fontello preload code removed. (some cases may use FA instead) 2021-07-15 17:38:39 -07:00
Cameron
04576b9f79 Commented library preload code. 2021-07-14 12:20:57 -07:00