Strict HTML error in text fields

More
1 year 10 months ago #83336 by mcmurdok
If I use the Server-Side validation in fc text fields and choose "SAFE HTML : remove dangerous tags/attributes" I get an error: 
Code:
0 - Joomla\Filter\InputFilter::__construct(): Argument #1 ($tagsArray) must be of type array, null given, called in www/libraries/src/Filter/InputFilter.php on line 69

I think it's related to  github.com/joomla/joomla-cms/pull/28946
I changed /components/com_flexicontent/classes/helpers/html.php in line 2122 from 
Code:
$safeHtmlFilter = JFilterInput::getInstance(null, null, 1, 1);
to
Code:
$safeHtmlFilter = InputFilter::getInstance([], [], InputFilter::TAGS_BLACKLIST, InputFilter::ATTR_BLACKLIST);
and add:
Code:
use Joomla\CMS\Filter\InputFilter;
But I could couldn't get it to work.

Any ideas?

Regards

Please Log in or Create an account to join the conversation.

More
1 year 10 months ago #83338 by micker
hello i think its already corrected
github.com/FLEXIcontent/flexicontent-cck...bcac1f68afab17e0f728
can you confirm it ?

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
1 year 10 months ago - 1 year 10 months ago #83380 by mcmurdok
Hi micker,
for textarea fields you fixed it. But for text fields, which call the following file:
Code:
4 Joomla\CMS\Filter\InputFilter::getInstance() JROOT/components/com_flexicontent/classes/helpers/html.php:2122 5 flexicontent_html::dataFilter() JROOT/plugins/flexicontent_fields/text/text.php:790

it isn't fixed.

By changing 
Code:
JROOT/components/com_flexicontent/classes/helpers/html.php
Line: 2122 
from:       
Code:
 $safeHtmlFilter = JFilterInput::getInstance(null, null, 1, 1);
to:          
Code:
 $safeHtmlFilter = JFilterInput::getInstance(, , 1, 1);
it's working
Regards
Last edit: 1 year 10 months ago by mcmurdok.

Please Log in or Create an account to join the conversation.

More
1 year 10 months ago #83381 by micker
yes commited

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
1 year 10 months ago - 1 year 10 months ago #83394 by bytekultur
I found this line with file search in the following flexicontent fields plugins:
  • plugins\flexicontent_fields\termlist\termlist.php
  • plugins\flexicontent_fields\text\text.php
  • plugins\flexicontent_fields\textarea\textarea.php

as well as in:
  • components\com_flexicontent\classes\helpers\html.php

In all cases, just use
Code:
$safeHtmlFilter = JFilterInput::getInstance([], [], 1, 1);
or
Code:
$safeHtmlFilter = JFilterInput::getInstance(array(), array(), 1, 1);
Last edit: 1 year 10 months ago by bytekultur.

Please Log in or Create an account to join the conversation.

More
1 year 10 months ago #83396 by micker
correct thanks

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.645 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline