bugfix/HOR-3556

udpate

update

update

update

update

update

update

change function to static

update

update
This commit is contained in:
hjonathan
2017-09-12 08:28:55 -04:00
parent 8699650919
commit 2e46e670c7
5 changed files with 40 additions and 15 deletions

View File

@@ -83,7 +83,7 @@ class AppNotes extends BaseAppNotes
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$aRow['NOTE_CONTENT'] = htmlentities(stripslashes($aRow['NOTE_CONTENT']), ENT_QUOTES, 'UTF-8');
$aRow['NOTE_CONTENT'] = stripslashes($aRow['NOTE_CONTENT']);
$response['notes'][] = $aRow;
$oDataset->next();
}
@@ -240,5 +240,21 @@ class AppNotes extends BaseAppNotes
return $response;
}
/**
* Add htmlEntities to notes in node_content
* @param $notes
* @return array
*/
public static function applyHtmlentitiesInNotes($notes)
{
if (isset($notes) && isset($notes["array"])) {
foreach ($notes["array"]["notes"] as &$note) {
$note["NOTE_CONTENT"] = htmlentities($note["NOTE_CONTENT"], ENT_QUOTES, 'UTF-8');
}
}
return $notes;
}
}