Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #274 - Fix Views HTML Entities Which Encode UTF Characters Incorrectly #403 #501

Open
wants to merge 2 commits into
base: hotfix
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,10 @@ public function fetch(
$listData[$key]['assigned_user_name']['user_name'] = $user->user_name ?? '';
$listData[$key]['assigned_user_name']['user_id'] = $record['assigned_user_id'];
$listData[$key]['module_name'] = $panelToModuleName[$listData[$key]['panel_name']];
$listData[$key]['description'] = html_entity_decode($listData[$key]['description'] ?? '', ENT_QUOTES);
$listData[$key]['name'] = html_entity_decode($listData[$key]['name'] ?? '', ENT_QUOTES);
$listData[$key]['status'] = html_entity_decode($listData[$key]['status'] ?? '', ENT_QUOTES);

}

$timelineEntryData = new ListData();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function toApi(SugarBean $bean, array &$container, string $name, string $
}

$relate['id'] = $parentId;
$relate[$rName] = $bean->$name ?? '';
$relate[$rName] = html_entity_decode($bean->$name ?? '', ENT_QUOTES);

$container[$newName] = $relate;
}
Expand Down
1 change: 1 addition & 0 deletions public/legacy/include/utils/db_utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ function from_db_convert($string, $type)
'>' => '>',
"'" => ''',
);
$GLOBALS['toHTML'] = $toHTML;
$GLOBALS['toHTML_keys'] = array_keys($toHTML);
$GLOBALS['toHTML_values'] = array_values($toHTML);
$GLOBALS['toHTML_keys_set'] = implode("", $GLOBALS['toHTML_keys']);
Expand Down