Skip to content

Commit

Permalink
handling html special chars, supporting better array features (#528)
Browse files Browse the repository at this point in the history
* handling html special chars, supporting better array features

* Handle quotes right
  • Loading branch information
jegelstaff authored Aug 11, 2024
1 parent c0d8d83 commit 3aff3a3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/formulize/include/extract.php
Original file line number Diff line number Diff line change
Expand Up @@ -2307,7 +2307,7 @@ function display($entry, $handle, $id=null, $localid="NULL") {

if(count((array) $foundValues) == 1) {
$GLOBALS['formulize_mostRecentLocalId'] = $GLOBALS['formulize_mostRecentLocalId'][0];
return $foundValues[0];
return htmlspecialchars_decode($foundValues[0], ENT_QUOTES);
} else {
return $foundValues;
}
Expand Down Expand Up @@ -2345,7 +2345,7 @@ function makeList($string, $type="bulleted") {
} else {
$type = "ul>";
}
$listItems = explode("\r", $string);
$listItems = is_array($string) ? $string : explode("\r", $string);
if(count((array) $listItems)>1) {
$list = "<" . $type;
foreach($listItems as $item) {
Expand All @@ -2363,6 +2363,7 @@ function makeList($string, $type="bulleted") {
// this function actually formats a string into a series of HTML paragraphs

function makePara($string, $parasToReturn="NULL") {
$string = is_array($string) ? implode("\n\r", $string) : $string;
if(strstr($string, "\n\r")) {
$paras = explode("\n\r", $string);
} elseif(strstr($string, "\n")) {
Expand Down Expand Up @@ -2391,6 +2392,7 @@ function makePara($string, $parasToReturn="NULL") {
// this function actually formats a string into a series of BR separated items

function makeBR($string) {
$string = is_array($string) ? implode("\r", $string) : $string;
$brs = explode("\r", $string);
if(count((array) $brs)>1) {
$start = 1;
Expand Down

0 comments on commit 3aff3a3

Please sign in to comment.