diff --git a/serendipity_event_blogpdf/serendipity_event_blogpdf.php b/serendipity_event_blogpdf/serendipity_event_blogpdf.php
index ecd2a538..658c5f6b 100644
--- a/serendipity_event_blogpdf/serendipity_event_blogpdf.php
+++ b/serendipity_event_blogpdf/serendipity_event_blogpdf.php
@@ -21,17 +21,6 @@ if (file_exists($probelang)) {
include dirname(__FILE__) . '/lang_en.inc.php';
-if (!function_exists('html_entity_decode')) {
- function html_entity_decode($given_html, $quote_style = ENT_QUOTES) {
- $trans_table = get_html_translation_table(HTML_SPECIALCHARS, $quote_style);
- if ($trans_table["'"] != ''') { # some versions of PHP match single quotes to '
- $trans_table["'"] = ''';
- }
-
- return (strtr($given_html, array_flip($trans_table)));
- }
-}
-
class serendipity_event_blogpdf extends serendipity_event
{
var $title = PLUGIN_EVENT_BLOGPDF_NAME;
@@ -340,9 +329,9 @@ class serendipity_event_blogpdf extends serendipity_event
if (serendipity_db_bool($this->get_config('html2pdf'))) {
return $string;
} elseif (serendipity_db_bool($this->get_config('fallback'))) {
- return strip_tags(html_entity_decode(utf8_decode($string)));
+ return strip_tags(html_entity_decode(utf8_decode($string), ENT_COMPAT, LANG_CHARSET));
} else {
- return strip_tags(html_entity_decode($string));
+ return strip_tags(html_entity_decode($string, ENT_COMPAT, LANG_CHARSET));
}
}
diff --git a/serendipity_event_custom_permalinks/serendipity_event_custom_permalinks.php b/serendipity_event_custom_permalinks/serendipity_event_custom_permalinks.php
index 2659a050..aef985d8 100644
--- a/serendipity_event_custom_permalinks/serendipity_event_custom_permalinks.php
+++ b/serendipity_event_custom_permalinks/serendipity_event_custom_permalinks.php
@@ -166,7 +166,7 @@ class serendipity_event_custom_permalinks extends serendipity_event {
';
- echo '
' . htmlentities($v['SUMMARY']) . '
';
- echo '
' . htmlentities($v['LOCATION']) . '
';
+ echo '
' . htmlentities($v['SUMMARY'], ENT_COMPAT, LANG_CHARSET) . '
';
+ echo '
' . htmlentities($v['LOCATION'], ENT_COMPAT, LANG_CHARSET) . '
';
echo '
' . date('d.m.Y, H:i', strtotime($dtstart)) . ' Uhr
';
/* LATER if (isset($v['DESC'])) {
echo '
' . $v['DESC'] . '
';
diff --git a/serendipity_event_microformats/smarty.inc.php b/serendipity_event_microformats/smarty.inc.php
index 678334fe..4eeb6844 100644
--- a/serendipity_event_microformats/smarty.inc.php
+++ b/serendipity_event_microformats/smarty.inc.php
@@ -123,7 +123,7 @@ echo '';*/
'hreview_url' => $params['url'],
'hreview_name' => $params['name'],
'hreview_desc' => $params['desc'],
- 'hreview_desc_escaped' => htmlentities($params['desc']),
+ 'hreview_desc_escaped' => htmlentities($params['desc'], ENT_COMPAT, LANG_CHARSET),
'hreview_rating' => floor($params['rating']),
'hreview_ratingvalue' => $params['rating'],
'hreview_best' => (int)$serendipity['smarty']->_tpl_vars['best']/*,
@@ -152,7 +152,7 @@ echo '';*/
'hcalendar_startdate_humanreadable' => date('d.m.Y H:i T', $params['startdate']),
'hcalendar_enddate_humanreadable' => date('d.m.Y H:i T', $params['enddate']),
'hcalendar_desc' => $params['desc'],
- 'hcalendar_desc_escaped' => htmlentities($params['desc'])
+ 'hcalendar_desc_escaped' => htmlentities($params['desc'], ENT_COMPAT, LANG_CHARSET)
)
);
break;
diff --git a/serendipity_event_mimetex/serendipity_event_mimetex.php b/serendipity_event_mimetex/serendipity_event_mimetex.php
index cec1e107..c1e3d761 100644
--- a/serendipity_event_mimetex/serendipity_event_mimetex.php
+++ b/serendipity_event_mimetex/serendipity_event_mimetex.php
@@ -24,7 +24,7 @@ class serendipity_event_mimetex extends serendipity_event
$propbag->add('description', PLUGIN_EVENT_MIMETEX_DESC);
$propbag->add('stackable', false);
$propbag->add('author', 'Matthew Groeninger');
- $propbag->add('version', '1.3');
+ $propbag->add('version', '1.4');
$propbag->add('requirements', array(
'serendipity' => '0.8',
'smarty' => '2.6.7',
@@ -235,7 +235,7 @@ class serendipity_event_mimetex extends serendipity_event
break;
case 'mimetex.php':
- $q = html_entity_decode(rawurldecode($_REQUEST['q']));
+ $q = html_entity_decode(rawurldecode($_REQUEST['q']), ENT_COMPAT, LANG_CHARSET);
$filetype = $this->get_config('filetype','gif');
if (!empty($q)) {
$filename = md5($q);
diff --git a/serendipity_event_mymood/serendipity_event_mymood.php b/serendipity_event_mymood/serendipity_event_mymood.php
index c7f5547f..4f5a9cda 100644
--- a/serendipity_event_mymood/serendipity_event_mymood.php
+++ b/serendipity_event_mymood/serendipity_event_mymood.php
@@ -239,7 +239,7 @@ class serendipity_event_mymood extends serendipity_event {
$img_tag = (!empty($mood_info['mood_img'])) ?
'
' :
'';
- $ascii = (!empty($mood_info['mood_ascii'])) ? htmlentities($mood_info['mood_ascii']) : '';
+ $ascii = (!empty($mood_info['mood_ascii'])) ? htmlentities($mood_info['mood_ascii'], ENT_COMPAT, LANG_CHARSET) : '';
$format=str_replace(array('{img}', '{name}', '{ascii}'),
array($img_tag, $mood_info['mood_name'], $ascii),
diff --git a/serendipity_event_phoneblogz/serendipity_event_phoneblogz.php b/serendipity_event_phoneblogz/serendipity_event_phoneblogz.php
index 7c304d9a..6f7685ab 100755
--- a/serendipity_event_phoneblogz/serendipity_event_phoneblogz.php
+++ b/serendipity_event_phoneblogz/serendipity_event_phoneblogz.php
@@ -25,7 +25,7 @@ class serendipity_event_phoneblogz extends serendipity_event
$propbag->add('description', PLUGIN_EVENT_PHONEBLOGZ_DESC);
$propbag->add('stackable', false);
$propbag->add('author', 'Garvin Hicking, phoneblogz.com');
- $propbag->add('version', '0.8');
+ $propbag->add('version', '0.9');
$propbag->add('requirements', array(
'serendipity' => '0.8',
'smarty' => '2.6.7',
diff --git a/serendipity_event_phoneblogz/xmlrpc.inc b/serendipity_event_phoneblogz/xmlrpc.inc
index 6ca32d3c..8e8b0aed 100644
--- a/serendipity_event_phoneblogz/xmlrpc.inc
+++ b/serendipity_event_phoneblogz/xmlrpc.inc
@@ -1449,7 +1449,7 @@
if($this->debug)
{
//by maHo, replaced htmlspecialchars with htmlentities
- print "
---GOT---\n" . htmlentities($data) . "\n---END---\n
";
+ print "
---GOT---\n" . htmlentities($data, ENT_COMPAT, LANG_CHARSET) . "\n---END---\n
";
}
if($data == '')
diff --git a/serendipity_event_picasa/serendipity_event_picasa.php b/serendipity_event_picasa/serendipity_event_picasa.php
index b2f6442c..bb7664ee 100644
--- a/serendipity_event_picasa/serendipity_event_picasa.php
+++ b/serendipity_event_picasa/serendipity_event_picasa.php
@@ -602,7 +602,7 @@ class serendipity_event_picasa extends serendipity_event {
if(!$subdirOfPruned)
{
$splitPath = explode('/', $relpath);
- $encodedRelpath = htmlentities($relpath, ENT_QUOTES);
+ $encodedRelpath = htmlentities($relpath, ENT_QUOTES, LANG_CHARSET);
$prefix = str_repeat(' ', count($splitPath));
echo "
\n";
}
@@ -647,7 +647,7 @@ class serendipity_event_picasa extends serendipity_event {
{
// undo encoding, including all quotes, then re-encode without encoding
// the quotes because this the text of the xml tag, which doesn't need quotes
- $unescapedvalue = htmlentities(html_entity_decode($tagval, ENT_QUOTES), ENT_NOQUOTES);
+ $unescapedvalue = htmlentities(html_entity_decode($tagval, ENT_QUOTES, LANG_CHARSET), ENT_NOQUOTES, LANG_CHARSET);
fputs($outputFile, "<$tagname>$unescapedvalue$tagname>\n");
}
@@ -691,9 +691,9 @@ class serendipity_event_picasa extends serendipity_event {
return;
}
- $albumName = html_entity_decode($_POST['albumName'], ENT_QUOTES);
+ $albumName = html_entity_decode($_POST['albumName'], ENT_QUOTES, LANG_CHARSET);
- $decodedParentDir = html_entity_decode($_POST['parentDir'], ENT_QUOTES);
+ $decodedParentDir = html_entity_decode($_POST['parentDir'], ENT_QUOTES, LANG_CHARSET);
$albumDir = $decodedParentDir . $albumName;
$dirname = $this->get_config('picasapath') . '/' . $albumDir;
@@ -769,7 +769,7 @@ class serendipity_event_picasa extends serendipity_event {
}
$imageCount = count($entries);
- $albumDesc = html_entity_decode($_POST['albumDescription'], ENT_QUOTES);
+ $albumDesc = html_entity_decode($_POST['albumDescription'], ENT_QUOTES, LANG_CHARSET);
$xmlPath = "$dirname/index.xml";
$xmlFile = fopen($xmlPath, 'w+');
diff --git a/serendipity_event_podcast/player/getid3/getid3.lib.php b/serendipity_event_podcast/player/getid3/getid3.lib.php
index 13353ed2..2b96b66c 100644
--- a/serendipity_event_podcast/player/getid3/getid3.lib.php
+++ b/serendipity_event_podcast/player/getid3/getid3.lib.php
@@ -27,7 +27,7 @@ class getid3_lib
}
}
if ($htmlsafe) {
- $returnstring = htmlentities($returnstring);
+ $returnstring = htmlentities($returnstring, ENT_COMPAT, LANG_CHARSET);
}
return $returnstring;
}
@@ -999,7 +999,7 @@ class getid3_lib
$charval += (ord($string{++$i}) & 0x3F);
}
if (($charval >= 32) && ($charval <= 127)) {
- $HTMLstring .= htmlentities(chr($charval));
+ $HTMLstring .= htmlentities(chr($charval), ENT_COMPAT, LANG_CHARSET);
} else {
$HTMLstring .= ''.$charval.';';
}
diff --git a/serendipity_event_podcast/player/getid3/module.tag.xmp.php b/serendipity_event_podcast/player/getid3/module.tag.xmp.php
index 7354f082..364204af 100644
--- a/serendipity_event_podcast/player/getid3/module.tag.xmp.php
+++ b/serendipity_event_podcast/player/getid3/module.tag.xmp.php
@@ -100,7 +100,7 @@ class Image_XMP
if (!$filehnd)
{
// Could't open the file - exit
- echo '
Could not open file '.htmlentities($filename).'
'."\n";
+ echo '
Could not open file '.htmlentities($filename, ENT_COMPAT, LANG_CHARSET).'
'."\n";
return false;
}
diff --git a/serendipity_event_podcast/player/getid3/write.php b/serendipity_event_podcast/player/getid3/write.php
index 16b19c7d..e3df4bdb 100644
--- a/serendipity_event_podcast/player/getid3/write.php
+++ b/serendipity_event_podcast/player/getid3/write.php
@@ -256,7 +256,7 @@ class getid3_writetags
if (($ape_writer->tag_data = $this->FormatDataForAPE()) !== false) {
$ape_writer->filename = $this->filename;
if (($success = $ape_writer->WriteAPEtag()) === false) {
- $this->errors[] = 'WriteAPEtag() failed with message(s):
- '.str_replace("\n", '
- ', htmlentities(trim(implode("\n", $ape_writer->errors)))).'
';
+ $this->errors[] = 'WriteAPEtag() failed with message(s):
- '.str_replace("\n", '
- ', htmlentities(trim(implode("\n", $ape_writer->errors)), ENT_COMPAT, LANG_CHARSET)).'
';
}
} else {
$this->errors[] = 'FormatDataForAPE() failed';
@@ -268,7 +268,7 @@ class getid3_writetags
if (($id3v1_writer->tag_data = $this->FormatDataForID3v1()) !== false) {
$id3v1_writer->filename = $this->filename;
if (($success = $id3v1_writer->WriteID3v1()) === false) {
- $this->errors[] = 'WriteID3v1() failed with message(s):
- '.str_replace("\n", '
- ', htmlentities(trim(implode("\n", $id3v1_writer->errors)))).'
';
+ $this->errors[] = 'WriteID3v1() failed with message(s):
- '.str_replace("\n", '
- ', htmlentities(trim(implode("\n", $id3v1_writer->errors)), ENT_COMPAT, LANG_CHARSET)).'
';
}
} else {
$this->errors[] = 'FormatDataForID3v1() failed';
@@ -284,7 +284,7 @@ class getid3_writetags
if (($id3v2_writer->tag_data = $this->FormatDataForID3v2($id3v2_writer->majorversion)) !== false) {
$id3v2_writer->filename = $this->filename;
if (($success = $id3v2_writer->WriteID3v2()) === false) {
- $this->errors[] = 'WriteID3v2() failed with message(s):
- '.str_replace("\n", '
- ', htmlentities(trim(implode("\n", $id3v2_writer->errors)))).'
';
+ $this->errors[] = 'WriteID3v2() failed with message(s):
- '.str_replace("\n", '
- ', htmlentities(trim(implode("\n", $id3v2_writer->errors)), ENT_COMPAT, LANG_CHARSET)).'
';
}
} else {
$this->errors[] = 'FormatDataForID3v2() failed';
@@ -296,7 +296,7 @@ class getid3_writetags
if (($vorbiscomment_writer->tag_data = $this->FormatDataForVorbisComment()) !== false) {
$vorbiscomment_writer->filename = $this->filename;
if (($success = $vorbiscomment_writer->WriteVorbisComment()) === false) {
- $this->errors[] = 'WriteVorbisComment() failed with message(s):
- '.str_replace("\n", '
- ', htmlentities(trim(implode("\n", $vorbiscomment_writer->errors)))).'
';
+ $this->errors[] = 'WriteVorbisComment() failed with message(s):
- '.str_replace("\n", '
- ', htmlentities(trim(implode("\n", $vorbiscomment_writer->errors)), ENT_COMPAT, LANG_CHARSET)).'
';
}
} else {
$this->errors[] = 'FormatDataForVorbisComment() failed';
@@ -308,7 +308,7 @@ class getid3_writetags
if (($metaflac_writer->tag_data = $this->FormatDataForMetaFLAC()) !== false) {
$metaflac_writer->filename = $this->filename;
if (($success = $metaflac_writer->WriteMetaFLAC()) === false) {
- $this->errors[] = 'WriteMetaFLAC() failed with message(s):
- '.str_replace("\n", '
- ', htmlentities(trim(implode("\n", $metaflac_writer->errors)))).'
';
+ $this->errors[] = 'WriteMetaFLAC() failed with message(s):
- '.str_replace("\n", '
- ', htmlentities(trim(implode("\n", $metaflac_writer->errors)), ENT_COMPAT, LANG_CHARSET)).'
';
}
} else {
$this->errors[] = 'FormatDataForMetaFLAC() failed';
@@ -320,7 +320,7 @@ class getid3_writetags
if (($real_writer->tag_data = $this->FormatDataForReal()) !== false) {
$real_writer->filename = $this->filename;
if (($success = $real_writer->WriteReal()) === false) {
- $this->errors[] = 'WriteReal() failed with message(s):
- '.str_replace("\n", '
- ', htmlentities(trim(implode("\n", $real_writer->errors)))).'
';
+ $this->errors[] = 'WriteReal() failed with message(s):
- '.str_replace("\n", '
- ', htmlentities(trim(implode("\n", $real_writer->errors)), ENT_COMPAT, LANG_CHARSET)).'
';
}
} else {
$this->errors[] = 'FormatDataForReal() failed';
diff --git a/serendipity_event_popfetcher/sprintpcs.php b/serendipity_event_popfetcher/sprintpcs.php
index 7b6a3a28..8d4ea7dd 100644
--- a/serendipity_event_popfetcher/sprintpcs.php
+++ b/serendipity_event_popfetcher/sprintpcs.php
@@ -177,7 +177,7 @@ function sprintpcs_pictureshare($maildir, $body, $authorid) {
$picture=substr($body, 0, $pos1-1);
$pos1=strrpos($picture, '"');
$url=substr($picture, $pos1+1);
- $url=html_entity_decode($url);
+ $url=html_entity_decode($url, ENT_COMPAT, LANG_CHARSET);
// Fetch the picture
$targeturl=sprintpcs_getrealpicture($url);
@@ -227,7 +227,7 @@ function sprintpcs_pictureshare($maildir, $body, $authorid) {
$msg=stristr($body, SPRINTPCS_MSG);
if ($msg) {
$pos=strpos($msg, '');
- $msg=html_entity_decode(substr($msg, 17, $pos-17), ENT_QUOTES).'
';
+ $msg=html_entity_decode(substr($msg, 17, $pos-17), ENT_QUOTES, LANG_CHARSET).'
';
if (trim($msg) == '
') $msg='';
} else {
$msg='';
@@ -239,7 +239,7 @@ function sprintpcs_pictureshare($maildir, $body, $authorid) {
$memo=stristr($memo, SPRINTPCS_MEMO_START);
$pos=strpos($memo, '"');
$memo=substr($memo, 0, $pos);
- $memo=html_entity_decode($memo);
+ $memo=html_entity_decode($memo, ENT_COMPAT, LANG_CHARSET);
$memosound = @file_get_contents($memo);
// Build the filename - I use this funky date name because the Sprint file path is too gnarly
$memofilename = date("F_j_Y__H_i_s").'.wav';
@@ -287,7 +287,7 @@ function sprintpcs_videoshare($maildir, $body, $authorid) {
}
$pos=strpos($video, '"');
$url=substr($video, 0, $pos);
- $url=html_entity_decode($url);
+ $url=html_entity_decode($url, ENT_COMPAT, LANG_CHARSET);
// Fetch the picture
$videostill = @file_get_contents($url);
@@ -364,12 +364,12 @@ function sprintpcs_videoshare($maildir, $body, $authorid) {
$msg=strstr($body, SPRINTPCS_MSG);
if ($msg) {
$pos=strpos($msg, '');
- $msg=html_entity_decode(substr($msg, 17, $pos-17), ENT_QUOTES).'
';
+ $msg=html_entity_decode(substr($msg, 17, $pos-17), ENT_QUOTES, LANG_CHARSET).'
';
if (trim($msg) == '
') $msg='';
} elseif ($msg=stristr($body, SPRINTPCS_VID_MSG)) {
$msg=strstr($msg, '"2">');
$pos=strpos($msg, '
';
+ $msg=html_entity_decode(substr($msg, 4, $pos-4), ENT_QUOTES, LANG_CHARSET).'
';
if (trim($msg) == '
') $msg='';
} else {
$msg='';
@@ -381,7 +381,7 @@ function sprintpcs_videoshare($maildir, $body, $authorid) {
$memo=stristr($memo, SPRINTPCS_MEMO_START);
$pos=strpos($memo, '"');
$memo=substr($memo, 0, $pos);
- $memo=html_entity_decode($memo);
+ $memo=html_entity_decode($memo, ENT_COMPAT, LANG_CHARSET);
$memosound = @file_get_contents($memo);
// Build the filename - I use this funky date name because the Sprint file path is too gnarly
$memofilename = date("F_j_Y__H_i_s").'.wav';
@@ -429,7 +429,7 @@ function sprintpcs_albumshare($maildir, $body, $authorid) {
}
$pos=strpos($video, '"');
$url=substr($video, 0, $pos);
- $url=html_entity_decode($url);
+ $url=html_entity_decode($url, ENT_COMPAT, LANG_CHARSET);
// Fetch the picture
$videostill = @file_get_contents($url);
@@ -506,12 +506,12 @@ function sprintpcs_albumshare($maildir, $body, $authorid) {
$msg=strstr($body, SPRINTPCS_MSG);
if ($msg) {
$pos=strpos($msg, '');
- $msg=html_entity_decode(substr($msg, 17, $pos-17), ENT_QUOTES).'
';
+ $msg=html_entity_decode(substr($msg, 17, $pos-17), ENT_QUOTES, LANG_CHARSET).'
';
if (trim($msg) == '
') $msg='';
} elseif ($msg=stristr($body, SPRINTPCS_VID_MSG)) {
$msg=strstr($msg, '"2">');
$pos=strpos($msg, '
';
+ $msg=html_entity_decode(substr($msg, 4, $pos-4), ENT_QUOTES, LANG_CHARSET).'
';
if (trim($msg) == '
') $msg='';
} else {
$msg='';
@@ -523,7 +523,7 @@ function sprintpcs_albumshare($maildir, $body, $authorid) {
$memo=stristr($memo, SPRINTPCS_MEMO_START);
$pos=strpos($memo, '"');
$memo=substr($memo, 0, $pos);
- $memo=html_entity_decode($memo);
+ $memo=html_entity_decode($memo, ENT_COMPAT, LANG_CHARSET);
$memosound = @file_get_contents($memo);
// Build the filename - I use this funky date name because the Sprint file path is too gnarly
$memofilename = date("F_j_Y__H_i_s").'.wav';
diff --git a/serendipity_event_recaptcha/recaptcha/recaptchalib.php b/serendipity_event_recaptcha/recaptcha/recaptchalib.php
index 6ee6fb29..777f1fc8 100644
--- a/serendipity_event_recaptcha/recaptcha/recaptchalib.php
+++ b/serendipity_event_recaptcha/recaptcha/recaptchalib.php
@@ -269,8 +269,8 @@ function recaptcha_mailhide_html($pubkey, $privkey, $email) {
$emailparts = _recaptcha_mailhide_email_parts ($email);
$url = recaptcha_mailhide_url ($pubkey, $privkey, $email);
- return htmlentities($emailparts[0]) . "
...@" . htmlentities ($emailparts [1]);
+ return htmlentities($emailparts[0], ENT_COMPAT, LANG_CHARSET) . "
...@" . htmlentities ($emailparts [1], ENT_COMPAT, LANG_CHARSET);
}
diff --git a/serendipity_event_recaptcha/serendipity_event_recaptcha.php b/serendipity_event_recaptcha/serendipity_event_recaptcha.php
index c57df2e1..4cca5819 100644
--- a/serendipity_event_recaptcha/serendipity_event_recaptcha.php
+++ b/serendipity_event_recaptcha/serendipity_event_recaptcha.php
@@ -39,7 +39,7 @@ var $error=null;
'smarty' => '2.6.7',
'php' => '4.1.0'
));
- $propbag->add('version', '0.10');
+ $propbag->add('version', '0.11');
$propbag->add('event_hooks', array(
'frontend_configure' => true,
'frontend_saveComment' => true,
diff --git a/serendipity_event_textlinkads/serendipity_event_textlinkads.php b/serendipity_event_textlinkads/serendipity_event_textlinkads.php
index 384a490d..401282fa 100644
--- a/serendipity_event_textlinkads/serendipity_event_textlinkads.php
+++ b/serendipity_event_textlinkads/serendipity_event_textlinkads.php
@@ -159,7 +159,7 @@ class serendipity_event_textlinkads extends serendipity_event
function html_entity_decode($string) {
if (function_exists('html_entity_decode')) {
- return html_entity_decode($string);
+ return html_entity_decode($string, ENT_COMPAT, LANG_CHARSET);
}
// replace numeric entities
@@ -181,7 +181,7 @@ class serendipity_event_textlinkads extends serendipity_event
$n = 0;
while (isset($out[$n])) {
- $retarr[$out[$n][1]][] = str_replace($search_ar, $replace_ar, $this->html_entity_decode(strip_tags($out[$n][0])));
+ $retarr[$out[$n][1]][] = str_replace($search_ar, $replace_ar, $this->html_entity_decode(strip_tags($out[$n][0]), ENT_COMPAT, LANG_CHARSET));
$n++;
}
diff --git a/serendipity_event_usergallery/JPEG_TOOLKIT/IPTC.php b/serendipity_event_usergallery/JPEG_TOOLKIT/IPTC.php
index b859b15e..5fe9a137 100644
--- a/serendipity_event_usergallery/JPEG_TOOLKIT/IPTC.php
+++ b/serendipity_event_usergallery/JPEG_TOOLKIT/IPTC.php
@@ -215,7 +215,7 @@ function Interpret_IPTC_to_HTML( $IPTC_info )
if ( $Record_Name == "" )
{
// Record is an unknown field - add message to HTML
- $output_str .= "
Unknown IPTC field '". htmlentities( $IPTC_Record['IPTC_Type'] ). "' : | " . nl2br( HTML_UTF8_Escape( $IPTC_Record['RecData'] ) ) ." |
\n";
+ $output_str .= "
Unknown IPTC field '". htmlentities( $IPTC_Record['IPTC_Type'], ENT_COMPAT, LANG_CHARSET ). "' : | " . nl2br( HTML_UTF8_Escape( $IPTC_Record['RecData'] ) ) ." |
\n";
}
else
{
diff --git a/serendipity_event_usergallery/JPEG_TOOLKIT/JPEG.php b/serendipity_event_usergallery/JPEG_TOOLKIT/JPEG.php
index 20838ca0..27f62a13 100644
--- a/serendipity_event_usergallery/JPEG_TOOLKIT/JPEG.php
+++ b/serendipity_event_usergallery/JPEG_TOOLKIT/JPEG.php
@@ -776,7 +776,7 @@ function Generate_JPEG_APP_Segment_HTML( $jpeg_header_data )
// Clean the segment name so it doesn't cause problems with HTML
- $seg_name = htmlentities( $seg_name );
+ $seg_name = htmlentities( $seg_name, ENT_COMPAT, LANG_CHARSET );
// Output a Table row containing this APP segment
$output .= "
$seg_name | " . $jpeg_header['SegName'] . " | " . strlen( $jpeg_header['SegData']). " bytes |
\n";
diff --git a/serendipity_event_usergallery/JPEG_TOOLKIT/Photoshop_IRB.php b/serendipity_event_usergallery/JPEG_TOOLKIT/Photoshop_IRB.php
index edc0fed4..628c5460 100644
--- a/serendipity_event_usergallery/JPEG_TOOLKIT/Photoshop_IRB.php
+++ b/serendipity_event_usergallery/JPEG_TOOLKIT/Photoshop_IRB.php
@@ -445,7 +445,7 @@ function Interpret_IRB_to_HTML( $IRB_array, $filename )
break;
case 0x040B : // URL
- $output_str .= "
$Resource_Name | " . htmlentities( $IRB_Resource['ResData'] ) ." |
\n";
+ $output_str .= "
$Resource_Name | " . htmlentities( $IRB_Resource['ResData'], ENT_COMPAT, LANG_CHARSET ) ." |
\n";
break;
case 0x040A : // Copyright Marked
diff --git a/serendipity_event_usergallery/serendipity_event_usergallery.php b/serendipity_event_usergallery/serendipity_event_usergallery.php
index 7478176a..ee661939 100644
--- a/serendipity_event_usergallery/serendipity_event_usergallery.php
+++ b/serendipity_event_usergallery/serendipity_event_usergallery.php
@@ -24,7 +24,7 @@ class serendipity_event_usergallery extends serendipity_event
$propbag->add('description', PLUGIN_EVENT_USERGALLERY_DESC);
$propbag->add('stackable', true);
$propbag->add('author', 'Arnan de Gans, Matthew Groeninger, and Stefan Willoughby');
- $propbag->add('version', '2.58');
+ $propbag->add('version', '2.59');
$propbag->add('requirements', array(
'serendipity' => '0.8',
'smarty' => '2.6.7',
diff --git a/serendipity_event_yq/serendipity_event_yq.php b/serendipity_event_yq/serendipity_event_yq.php
index 873d8474..a0866f70 100644
--- a/serendipity_event_yq/serendipity_event_yq.php
+++ b/serendipity_event_yq/serendipity_event_yq.php
@@ -28,7 +28,7 @@ class serendipity_event_yq extends serendipity_event {
$propbag->add('description', PLUGIN_EVENT_YQ_DESC);
$propbag->add('stackable', false);
$propbag->add('author', 'Rasmus Lerdorf');
- $propbag->add('version', '1.2');
+ $propbag->add('version', '1.3');
$propbag->add('requirements', array(
'serendipity' => '0.8',
'smarty' => '2.6.7',
@@ -74,7 +74,7 @@ class serendipity_event_yq extends serendipity_event {
$hooks = &$bag->get('event_hooks');
$results = $this->get_config('results');
$context_length = $this->get_config('context_length');
- $add_context = htmlentities($this->get_config('add_context'));
+ $add_context = htmlentities($this->get_config('add_context'), ENT_COMPAT, LANG_CHARSET);
$links = array();
if (isset($hooks[$event])) {
@@ -84,7 +84,7 @@ class serendipity_event_yq extends serendipity_event {
break;
case 'frontend_display:html:per_entry':
- $title = htmlentities($eventData['title']);
+ $title = htmlentities($eventData['title'], ENT_COMPAT, LANG_CHARSET);
$tmp = strip_tags($eventData['body']);
$tmp = wordwrap($tmp, 80, '<>');
$tmp = explode('<>', $tmp);
diff --git a/serendipity_plugin_delicious/serendipity_plugin_delicious.php b/serendipity_plugin_delicious/serendipity_plugin_delicious.php
index b2838e42..e57a0c6b 100644
--- a/serendipity_plugin_delicious/serendipity_plugin_delicious.php
+++ b/serendipity_plugin_delicious/serendipity_plugin_delicious.php
@@ -192,6 +192,6 @@ class serendipity_plugin_delicious extends serendipity_plugin {
}
function delicious_clean_htmlspecialchars($given, $quote_style = ENT_QUOTES) {
- return htmlspecialchars(html_entity_decode($given, $quote_style), $quote_style);
+ return htmlspecialchars(html_entity_decode($given, $quote_style, LANG_CHARSET), $quote_style, LANG_CHARSET);
}
?>
\ No newline at end of file
diff --git a/serendipity_plugin_flickr/phpFlickr/PEAR/DB/storage.php b/serendipity_plugin_flickr/phpFlickr/PEAR/DB/storage.php
index 0af76aea..394d9e8a 100644
--- a/serendipity_plugin_flickr/phpFlickr/PEAR/DB/storage.php
+++ b/serendipity_plugin_flickr/phpFlickr/PEAR/DB/storage.php
@@ -276,7 +276,7 @@ class DB_storage extends PEAR
{
foreach ($this->_properties as $prop => $foo) {
print "$prop = ";
- print htmlentities($this->$prop);
+ print htmlentities($this->$prop, ENT_COMPAT, LANG_CHARSET);
print "
\n";
}
}
diff --git a/serendipity_plugin_flickr/serendipity_plugin_flickr.php b/serendipity_plugin_flickr/serendipity_plugin_flickr.php
index 1c792922..a7ece5f7 100644
--- a/serendipity_plugin_flickr/serendipity_plugin_flickr.php
+++ b/serendipity_plugin_flickr/serendipity_plugin_flickr.php
@@ -28,7 +28,7 @@ class serendipity_plugin_flickr extends serendipity_plugin {
'smarty' => '2.6.9',
'php' => '4.3.0'
));
- $propbag->add('version', '1.08');
+ $propbag->add('version', '1.09');
$propbag->add('configuration', array(
'title',
'email',
diff --git a/serendipity_plugin_flickrbadge/serendipity_plugin_flickrbadge.php b/serendipity_plugin_flickrbadge/serendipity_plugin_flickrbadge.php
index 605a592c..288dbda0 100644
--- a/serendipity_plugin_flickrbadge/serendipity_plugin_flickrbadge.php
+++ b/serendipity_plugin_flickrbadge/serendipity_plugin_flickrbadge.php
@@ -7,7 +7,7 @@
*
* @author Lars Strojny
*/
-@define('SERENDIPITY_PLUGIN_FLICKRBADGE_VERSION', '0.10');
+@define('SERENDIPITY_PLUGIN_FLICKRBADGE_VERSION', '0.11');
if (IN_SERENDIPITY != true) die("Don't hack");
diff --git a/serendipity_plugin_nugget_multilingual/serendipity_plugin_nugget_multilingual.php b/serendipity_plugin_nugget_multilingual/serendipity_plugin_nugget_multilingual.php
index ae09f5b9..9606d7c5 100644
--- a/serendipity_plugin_nugget_multilingual/serendipity_plugin_nugget_multilingual.php
+++ b/serendipity_plugin_nugget_multilingual/serendipity_plugin_nugget_multilingual.php
@@ -23,7 +23,7 @@ class serendipity_plugin_nugget_multilingual extends serendipity_plugin {
$propbag->add('description', PLUGIN_NUGGET_MULTI_DESC);
$propbag->add('stackable', true);
$propbag->add('author', 'Wesley Hwang-Chung');
- $propbag->add('version', '1.6');
+ $propbag->add('version', '1.7');
$propbag->add('configuration', array('language', 'title', 'content', 'markup', 'show_where'));
$propbag->add('groups', array('FRONTEND_VIEWS'));
@@ -131,7 +131,7 @@ class serendipity_plugin_nugget_multilingual extends serendipity_plugin {
$is_plugin_owner = ($this->serendipity_owner == $serendipity['authorid'] || serendipity_checkPermission('adminPluginsMaintainOthers'));
if ($is_plugin_owner) {
- echo '';
+ echo '';
}
}
}
diff --git a/serendipity_plugin_socialbookmarks/serendipity_plugin_socialbookmarks.php b/serendipity_plugin_socialbookmarks/serendipity_plugin_socialbookmarks.php
index 6ad516d8..13408441 100644
--- a/serendipity_plugin_socialbookmarks/serendipity_plugin_socialbookmarks.php
+++ b/serendipity_plugin_socialbookmarks/serendipity_plugin_socialbookmarks.php
@@ -280,7 +280,7 @@ class serendipity_plugin_socialbookmarks extends serendipity_plugin {
if ($this->get_config('displayThumbnails')) {
$socialbookmarksContent .= $this->socialbookmarks_get_thumbnail($item->get_description());
} else {
- $socialbookmarksContent .= html_entity_decode($this->decode($item->get_title()));
+ $socialbookmarksContent .= html_entity_decode($this->decode($item->get_title()), ENT_COMPAT, LANG_CHARSET);
}
$socialbookmarksContent .= '';
if ($this->get_config('displayTags') && class_exists('serendipity_event_freetag')) { // display tags for each bookmark
diff --git a/serendipity_plugin_twitter/classes/Twitter.php b/serendipity_plugin_twitter/classes/Twitter.php
index eaee2566..8f7535a2 100644
--- a/serendipity_plugin_twitter/classes/Twitter.php
+++ b/serendipity_plugin_twitter/classes/Twitter.php
@@ -229,7 +229,7 @@ class Twitter {
function parse_entry_json( $item ) {
$entry = array();
- if (preg_match('/href="([^"]*)"/',html_entity_decode($item->source),$matches)) {
+ if (preg_match('/href="([^"]*)"/',html_entity_decode($item->source, ENT_COMPAT, LANG_CHARSET),$matches)) {
$source_link = $matches[1][0];
}
//$link = str_replace('','',html_entity_decode($item['source'])));
diff --git a/serendipity_plugin_twitter/classes/TwitterOAuthApi.php b/serendipity_plugin_twitter/classes/TwitterOAuthApi.php
index bdc2b50a..cae17b70 100644
--- a/serendipity_plugin_twitter/classes/TwitterOAuthApi.php
+++ b/serendipity_plugin_twitter/classes/TwitterOAuthApi.php
@@ -105,7 +105,7 @@ class TwitterOAuthApi {
static function parse_entry_json( $item ) {
$entry = array();
- if (preg_match('/href="([^"]*)"/',html_entity_decode($item->source),$matches)) {
+ if (preg_match('/href="([^"]*)"/',html_entity_decode($item->source, ENT_COMPAT, LANG_CHARSET),$matches)) {
$source_link = $matches[1][0];
}
//$link = str_replace('','',html_entity_decode($item['source'])));
diff --git a/serendipity_plugin_twitter/plugin_version.inc.php b/serendipity_plugin_twitter/plugin_version.inc.php
index 7600ab00..08f1d45a 100644
--- a/serendipity_plugin_twitter/plugin_version.inc.php
+++ b/serendipity_plugin_twitter/plugin_version.inc.php
@@ -1,4 +1,4 @@
";
echo "Click here to download";
echo '
';
- echo nl2br(htmlentities($template_contents));
+ echo nl2br(htmlentities($template_contents, ENT_COMPAT, LANG_CHARSET));
echo "
";
echo "Click here to download";
echo "
";
@@ -826,7 +826,7 @@ function blogdata_view_all($tplid = '') {
$TEMPLATE_DESCRIPTION = $templatedata['description'];
// Template contents
- $template_contents = html_entity_decode($templatedata['template']);
+ $template_contents = html_entity_decode($templatedata['template'], ENT_COMPAT, LANG_CHARSET);
// Expand the template variables recursively
$templatevars = expand_templatevars($templatevars);
@@ -842,7 +842,7 @@ function blogdata_view_all($tplid = '') {
$template_contents = str_replace('{WWWUSER}', $WWWUSER, $template_contents);
*/
foreach ($templatevars as $tplvar) {
- $template_contents = str_replace('{'.$tplvar['name'].'}', html_entity_decode($tplvar['value']), $template_contents);
+ $template_contents = str_replace('{'.$tplvar['name'].'}', html_entity_decode($tplvar['value'], ENT_COMPAT, LANG_CHARSET), $template_contents);
}
// Insert specific template template variables
@@ -876,7 +876,7 @@ function blogdata_view_all($tplid = '') {
$template_temp = str_replace('{BLOGURL}', $BLOGURL, $template_temp);
- echo nl2br(htmlentities($template_temp));
+ echo nl2br(htmlentities($template_temp, ENT_COMPAT, LANG_CHARSET));
}
diff --git a/setup/s9y_conf/s9y_conf_2.0.0/install/config.write.php b/setup/s9y_conf/s9y_conf_2.0.0/install/config.write.php
index 6d0d18b7..9ca70345 100644
--- a/setup/s9y_conf/s9y_conf_2.0.0/install/config.write.php
+++ b/setup/s9y_conf/s9y_conf_2.0.0/install/config.write.php
@@ -96,7 +96,7 @@ debug_msg (\"FILE: \".__FILE__,3);
?>";
- debug_msg(nl2br(htmlentities($config_contents)), 5);
+ debug_msg(nl2br(htmlentities($config_contents, ENT_COMPAT, LANG_CHARSET)), 5);
// Open the file for writing
if (!$file_handle = @fopen($config_file,'wb')) { // Failed to open the file?
diff --git a/setup/s9y_conf/s9y_conf_2.0.0/install/dbconfig.write.php b/setup/s9y_conf/s9y_conf_2.0.0/install/dbconfig.write.php
index a2d902cb..5fc52b26 100644
--- a/setup/s9y_conf/s9y_conf_2.0.0/install/dbconfig.write.php
+++ b/setup/s9y_conf/s9y_conf_2.0.0/install/dbconfig.write.php
@@ -128,7 +128,7 @@ define('S9YCONF_DB_PREFIX' , '".$dbcfg_prefix."');
?>";
- debug_msg(nl2br(htmlentities($dbconfig_contents)), 5);
+ debug_msg(nl2br(htmlentities($dbconfig_contents, ENT_COMPAT, LANG_CHARSET)), 5);
// Open the file for writing
if (!$file_handle = @fopen($dbconfig_file,'wb')) { // Failed to open the file?
diff --git a/setup/s9y_conf/s9y_conf_2.0.0/template.php b/setup/s9y_conf/s9y_conf_2.0.0/template.php
index b06e181c..8c595ae1 100644
--- a/setup/s9y_conf/s9y_conf_2.0.0/template.php
+++ b/setup/s9y_conf/s9y_conf_2.0.0/template.php
@@ -380,7 +380,7 @@ function template_edit($id) {
$name = $result['name'];
$description=$result['description'];
- $template = html_entity_decode($result['template']);
+ $template = html_entity_decode($result['template'], ENT_COMPAT, LANG_CHARSET);
?>
diff --git a/setup/s9y_conf/s9y_conf_2.0.0/templatevars.php b/setup/s9y_conf/s9y_conf_2.0.0/templatevars.php
index fc4d956e..76304cc4 100644
--- a/setup/s9y_conf/s9y_conf_2.0.0/templatevars.php
+++ b/setup/s9y_conf/s9y_conf_2.0.0/templatevars.php
@@ -386,7 +386,7 @@ function templatevars_edit($id) {
$result = db_read_templatevars($id);
$name = $result['name'];
- $value=html_entity_decode($result['value']);
+ $value=html_entity_decode($result['value'], ENT_COMPAT, LANG_CHARSET);
?>
diff --git a/setup/s9y_conf/s9y_conf_2.0.0/tplfile.php b/setup/s9y_conf/s9y_conf_2.0.0/tplfile.php
index 7bd8b9c0..0e037f96 100644
--- a/setup/s9y_conf/s9y_conf_2.0.0/tplfile.php
+++ b/setup/s9y_conf/s9y_conf_2.0.0/tplfile.php
@@ -126,7 +126,7 @@ $TEMPLATE_DESCRIPTION = $templatedata['description'];
// Template contents
-$template_contents = html_entity_decode($templatedata['template']);
+$template_contents = html_entity_decode($templatedata['template'], ENT_COMPAT, LANG_CHARSET);
// Expand the template variables recursively
$templatevars = expand_templatevars($templatevars);
@@ -142,7 +142,7 @@ $template_contents = str_replace('{WWWGROUP}', $WWWGROUP, $template_contents);
$template_contents = str_replace('{WWWUSER}', $WWWUSER, $template_contents);
*/
foreach ($templatevars as $tplvar) {
- $template_contents = str_replace('{'.$tplvar['name'].'}', html_entity_decode($tplvar['value']), $template_contents);
+ $template_contents = str_replace('{'.$tplvar['name'].'}', html_entity_decode($tplvar['value'], ENT_COMPAT, LANG_CHARSET), $template_contents);
}
// Insert specific blog template variables
diff --git a/setup/s9y_conf/s9y_conf_2.0.0/tplfileall.php b/setup/s9y_conf/s9y_conf_2.0.0/tplfileall.php
index a4be3670..78fd258b 100644
--- a/setup/s9y_conf/s9y_conf_2.0.0/tplfileall.php
+++ b/setup/s9y_conf/s9y_conf_2.0.0/tplfileall.php
@@ -109,7 +109,7 @@ $TEMPLATE_NAME = $templatedata['name'];
$TEMPLATE_DESCRIPTION = $templatedata['description'];
// Template contents
-$template_contents = html_entity_decode($templatedata['template']);
+$template_contents = html_entity_decode($templatedata['template'], ENT_COMPAT, LANG_CHARSET);
// Expand the template variables recursively
$templatevars = expand_templatevars($templatevars);
@@ -125,7 +125,7 @@ $template_contents = str_replace('{WWWGROUP}', $WWWGROUP, $template_contents);
$template_contents = str_replace('{WWWUSER}', $WWWUSER, $template_contents);
*/
foreach ($templatevars as $tplvar) {
- $template_contents = str_replace('{'.$tplvar['name'].'}', html_entity_decode($tplvar['value']), $template_contents);
+ $template_contents = str_replace('{'.$tplvar['name'].'}', html_entity_decode($tplvar['value'], ENT_COMPAT, LANG_CHARSET), $template_contents);
}
// Insert specific template template variables