more htmlspecialchars sanitisation
This commit is contained in:
parent
941f81eb30
commit
303324cdff
@ -1108,7 +1108,7 @@ function status_editor($a,$x,$popup=false) {
|
||||
'$shortsetloc' => t('set location'),
|
||||
'$noloc' => t('Clear browser location'),
|
||||
'$shortnoloc' => t('clear location'),
|
||||
'$title' => ((x($x,'title')) ? htmlspecialchars($x['title']) : ''),
|
||||
'$title' => ((x($x,'title')) ? htmlspecialchars($x['title'], ENT_COMPAT,'UTF-8') : ''),
|
||||
'$placeholdertitle' => t('Set title'),
|
||||
'$catsenabled' => ((feature_enabled($x['profile_uid'],'categories') && (! $webpage)) ? 'categories' : ''),
|
||||
'$category' => "",
|
||||
@ -1117,7 +1117,7 @@ function status_editor($a,$x,$popup=false) {
|
||||
'$permset' => t('Permission settings'),
|
||||
'$shortpermset' => t('permissions'),
|
||||
'$ptyp' => (($notes_cid) ? 'note' : 'wall'),
|
||||
'$content' => ((x($x,'body')) ? htmlspecialchars($x['body']) : ''),
|
||||
'$content' => ((x($x,'body')) ? htmlspecialchars($x['body'], ENT_COMPAT,'UTF-8') : ''),
|
||||
'$post_id' => '',
|
||||
'$baseurl' => $a->get_baseurl(true),
|
||||
'$defloc' => $x['default_location'],
|
||||
|
@ -582,7 +582,7 @@ function scale_external_images($s, $include_link = true, $scale_replace = false)
|
||||
$a = get_app();
|
||||
|
||||
// Picture addresses can contain special characters
|
||||
$s = htmlspecialchars_decode($s);
|
||||
$s = htmlspecialchars_decode($s, ENT_COMPAT,'UTF-8');
|
||||
|
||||
$matches = null;
|
||||
$c = preg_match_all('/\[img(.*?)\](.*?)\[\/img\]/ism',$s,$matches,PREG_SET_ORDER);
|
||||
|
@ -87,9 +87,9 @@ function format_term_for_display($term) {
|
||||
return $s;
|
||||
|
||||
if($term['url'])
|
||||
$s .= '<a href="' . $term['url'] . '">' . htmlspecialchars($term['term']) . '</a>';
|
||||
$s .= '<a href="' . $term['url'] . '">' . htmlspecialchars($term['term'], ENT_COMPAT,'UTF-8') . '</a>';
|
||||
else
|
||||
$s .= htmlspecialchars($term['term']);
|
||||
$s .= htmlspecialchars($term['term'], ENT_COMPAT,'UTF-8');
|
||||
return $s;
|
||||
}
|
||||
|
||||
|
@ -219,7 +219,7 @@ function widget_savedsearch($arr) {
|
||||
'term' => $rr['term'],
|
||||
'dellink' => z_root() . '/' . $srchurl . (($hasq) ? '' : '?f=') . '&searchremove=1&search=' . urlencode($rr['term']),
|
||||
'srchlink' => z_root() . '/' . $srchurl . (($hasq) ? '' : '?f=') . '&search=' . urlencode($rr['term']),
|
||||
'displayterm' => htmlspecialchars($rr['term']),
|
||||
'displayterm' => htmlspecialchars($rr['term'], ENT_COMPAT,'UTF-8'),
|
||||
'encodedterm' => urlencode($rr['term']),
|
||||
'delete' => t('Remove term'),
|
||||
'selected' => ($search==$rr['term']),
|
||||
@ -317,7 +317,7 @@ function widget_fullprofile($arr) {
|
||||
|
||||
function widget_categories($arr) {
|
||||
$a = get_app();
|
||||
$cat = ((x($_REQUEST,'cat')) ? htmlspecialchars($_REQUEST['cat']) : '');
|
||||
$cat = ((x($_REQUEST,'cat')) ? htmlspecialchars($_REQUEST['cat'],ENT_COMPAT,'UTF-8') : '');
|
||||
$srchurl = $a->query_string;
|
||||
$srchurl = rtrim(preg_replace('/cat\=[^\&].*?(\&|$)/is','',$srchurl),'&');
|
||||
$srchurl = str_replace(array('?f=','&f='),array('',''),$srchurl);
|
||||
|
Reference in New Issue
Block a user