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

929 Commits

Author SHA1 Message Date
Cameron
e6dc147074 Closes #4952 - Update selectize.js to v0.15.2 2023-01-13 10:04:39 -08:00
Cameron
ec68c88910 Closes #4927 Extra options added to bbarea() 2022-12-18 18:36:36 -08:00
Cameron
2f4fdf9520 Closes #4906 - Allow for override of visibility for primary-id field during create/edit. 2022-11-06 09:16:25 -08:00
Cameron
c494c04c7e Fixes #4806 - news keyword maxlength limitation fix. 2022-06-30 19:01:52 -07:00
Cameron
52cf8f5bfa Closes #4783 Added Page Meta-Title field and synced with Page title.
Issue #6 global LAN_META_DESCRIPTION and LAN_META_TITLE added and replacements made throughout.
2022-06-08 18:29:37 -07:00
Cameron
94bf1efda2 Issue #4783 Added new field for meta-news-title. New prefs added for SEO Title and Description character limits. 2022-06-06 17:28:23 -07:00
Cameron
327616002e Fixes #4761 - Related Summary parsing as BODY instead of SUMMARY. 2022-04-21 15:35:42 -07:00
Cameron
4d6a5ea310 Fixes #4758 Admin-UI hidden field $parms were not being applied. 2022-04-19 07:15:23 -07:00
Cameron
f8b04b64d4 Fixes #4751 - Form tabs issue. Test added. 2022-04-07 13:11:56 -07:00
Cameron
196f952db8 Closes #4514 Theme developers can now set the default style, just as they would with the default layout. 2022-04-06 08:37:13 -07:00
Cameron
55980a29a8 Generated PHPDoc for all classes in e107_handlers where one was missing. toNumber() updated to always return int or float. 2022-04-04 10:54:24 -07:00
Cameron
e801b02dee Closes #4744 - Media-Manager default set to Grid. New CSS grid added. Extra tests added for toGlyph(). Added wildcard mime-type filters in Media-Manager. 2022-04-02 09:34:06 -07:00
Jimmi08
64dcf0c056 #4665 load bbcode buttons only if HTML is allowed for user
CLOSES #4665

Tested scenarios:

- site wysiwyg on, html access  -  result tinymce
- site wysiwyg on,  no html access  - result bbcodes
- site wysiwyg off,  forum wysiwyg on,  no html access  - result bbcodes
- site wysiwyg off,  forum wysiwyg on,  html access  - result tinymce

It worked like this before too, but bbcodes were always rendered (not visible with tinymce)
2022-03-31 12:22:04 +02:00
Cameron
3d3b2ec85d PHP Notice fix. 2022-03-15 13:48:32 -07:00
Cameron
748fd4b9b6 Fixes #4700 - linkwords inconsistencies. 2022-03-12 11:50:27 -08:00
Nick Liu
169efa09b9
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.
2022-02-06 16:49:56 +01:00
Nick Liu
754c29d230
#4661: Don't double-encode ampersand in e_form::thead()
I guessed the `filter_var(…, FILTER_SANITIZE_STRING)` intention
mentioned in 20882920a0b68937570264949512acc0c4841dbd.  I guessed wrong.
This fixes the guess to be just HTML tag removal.

Fixes: https://github.com/e107inc/e107/issues/4661
2022-01-17 13:20:34 +01:00
Cameron
d8ce385929 Fixes #4631 - Edit button modal caption and submit button issue. 2021-12-15 11:52:46 -08:00
Cameron
0d8f3e9086 PHPDoc fixes and code optimization. 2021-12-03 14:58:33 -08:00
Cameron
2c9afc83ee More PHP 8.1 fixes. 2021-11-26 12:36:25 -08: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
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
7930aba4ca Fixes #4609 - Quick fix for inconsistent drop-down behavior PHP7 -> PHP8. 2021-11-01 14:41:40 -07:00
Cameron
d6b0391a2d Fixed corruption of carousel attributes and other 'data-' keys. Test added. 2021-10-14 08:08:43 -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
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
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
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
32618817d1 Character counting display added to meta description on admin News and Page inputs. 2021-08-12 11:51:55 -07:00
Cameron
6d0810af0d Fixes #4468 - quick debugging of json data using type: 'text' and hidden() field fix. 2021-03-31 15:14:58 -07:00
Cameron
c33b91ee5c Issue #4368 Fixed hardcoded string for 'related' content. Now uses tablerender(). Shortcode processing of {---CAPTION---} added. 2021-03-22 11:26:51 -07:00
Jimako
467d3c968f
Correct pagination for frontend Admin UI 2021-03-02 17:32:18 +01: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
Jimako
ba28818003
#275 fix for empty link in home icon for WAVE 2021-02-21 19:24:43 +01:00
Cameron
cae8cf1345 Fixes #4398 - Page breadcrumb. Disabled breadcrumb on frontpage. 2021-02-18 17:02:37 -08:00
Cameron
2bf5ee3909 Admin area tool tips simplified to a single location. Pref simplified to Enable/Disable. Fixed flip-switch 'e-expandit' failures in Admin > Prefs. 2021-02-12 12:19:58 -08:00
Cameron
7133d4bb6f Closes #4228 TinyMce can now load the frontend theme in the editor when 'wysiwyg' is found in the scope of a declared css file within theme.xml
Fixes #4371 - FontAwesome5 is now loaded in the TinyMce editor when detected in the frontend theme.
2021-02-11 16:39:50 -08:00
Cameron
a1faa5d08b Bootstrap5 styling 2021-02-10 09:03:17 -08:00
Cameron
1f3e70d40a Fixes #4374 help() form method fix. 2021-02-09 14:36:40 -08:00
Cameron
5842e51f15 Prevent tooltip visibility during page load. 2021-02-09 11:07:58 -08:00
Cameron
72c54371cc e107::getSession()->set will now accept multi-dimensional key format. Test added. Form-handler PHP8 fix. 2021-02-08 11:59:04 -08:00
Cameron
c32e5bf1e2 e107::unserialize() will now return the array if the input is an array. Additional form-handler tests added for type: media, file and files. Admin-ui can now manage a change of field type from 'array' to 'json' without additional changes needed. 2021-02-08 08:44:44 -08:00
Cameron
7698773f0e Left-align tooltip text in new admin skins/styles. 2021-02-07 12:20:57 -08:00
Cameron
e4f8082d37 Theme Manager for Admin area, now displays previews of each admin skin. 2021-02-04 16:22:25 -08:00
Cameron
5870fbdb84 "<div class='field-help'>" etc has been replaced by the $frm->help() method and is also used by the admin-ui. 2021-02-04 08:45:10 -08:00