Skip to content

Commit

Permalink
Dev: QueXMLCleanup can accept null, but cast to string
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Mar 29, 2023
1 parent 8565000 commit 21a9811
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion application/helpers/export_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -1042,9 +1042,16 @@ function getXMLDataSingleTable($iSurveyID, $sTableName, $sDocType, $sXMLTableTag

/**
* from export_structure_quexml.php
*
* @param ?string $string
* @param ?string $allow
* @return string
*/
function QueXMLCleanup(string $string, string $allow = '<p><b><u><i><em>')
function QueXMLCleanup($string, $allow = '<p><b><u><i><em>')
{
$string = (string) $string;
$allow = (string) $allow;

$sAllowedTags = str_replace(">", "", str_replace("<", "", str_replace("><", ",", $allow)));
$sResult = str_ireplace("<br />", "\n", $string);
$oPurifier = new CHtmlPurifier();
Expand Down

0 comments on commit 21a9811

Please sign in to comment.