Modified: web/php/trunk/cal.php =================================================================== --- web/php/trunk/cal.php 2010-10-28 20:18:09 UTC (rev 304979) +++ web/php/trunk/cal.php 2010-10-29 12:08:16 UTC (rev 304980) @@ -30,13 +30,13 @@ if ($id) { // Try to load event by ID and display header and info for that event if ($event = load_event($id)) { - site_header("Event: " . stripslashes(htmlentities($event['sdesc'], ENT_QUOTES, 'UTF-8'))); + site_header("Event: " . stripslashes(htmlentities($event['sdesc'], ENT_QUOTES | ENT_IGNORE, 'UTF-8'))); display_event($event, 0); $begun = TRUE; } // Unable to find event, put this to the error messages' list else { - $errors[] = "There is no event for specified id ('".htmlentities($id, ENT_QUOTES, 'UTF-8')."')"; + $errors[] = "There is no event for specified id ('".htmlentities($id, ENT_QUOTES | ENT_IGNORE, 'UTF-8')."')"; } } @@ -68,14 +68,14 @@ // Wrong date specified else { - $errors[] = "The specified date (".htmlentities("$cy/$cm/$cd", ENT_QUOTES, 'UTF-8').") was not valid."; + $errors[] = "The specified date (".htmlentities("$cy/$cm/$cd", ENT_QUOTES | ENT_IGNORE, 'UTF-8').") was not valid."; unset($cm); unset($cd); unset($cy); } } // Check if month and year is valid if ($cm && $cy && !checkdate($cm,1,$cy)) { - $errors[] = "The specified year and month (".htmlentities("$cy, $cm", ENT_QUOTES, 'UTF-8').") are not valid."; + $errors[] = "The specified year and month (".htmlentities("$cy, $cm", ENT_QUOTES | ENT_IGNORE, 'UTF-8').") are not valid."; unset($cm); unset($cy); } @@ -221,7 +221,7 @@ ($COUNTRY == $event['country'] ? "" : ""), '', - stripslashes(htmlentities($event['sdesc'], ENT_QUOTES, 'UTF-8')), + stripslashes(htmlentities($event['sdesc'], ENT_QUOTES | ENT_IGNORE, 'UTF-8')), '', ($COUNTRY == $event['country'] ? "" : ""), ''; Modified: web/php/trunk/include/layout.inc =================================================================== --- web/php/trunk/include/layout.inc 2010-10-28 20:18:09 UTC (rev 304979) +++ web/php/trunk/include/layout.inc 2010-10-29 12:08:16 UTC (rev 304980) @@ -467,9 +467,9 @@ // function make_popup_link ($url, $linktext=false, $target=false, $windowprops="", $extras=false) { return sprintf("%s", - htmlspecialchars($url, ENT_QUOTES), + htmlspecialchars($url, ENT_QUOTES | ENT_IGNORE), ($target ? $target : "_new"), - htmlspecialchars($url, ENT_QUOTES), + htmlspecialchars($url, ENT_QUOTES | ENT_IGNORE), ($target ? $target : "_new"), $windowprops, ($extras ? ' '.$extras : ''), @@ -615,9 +615,9 @@ } // Print link in case we have one - if ($event['url']) { echo ''; } + if ($event['url']) { echo ''; } // Print event description - echo "", stripslashes(htmlentities($event['sdesc'], ENT_QUOTES, 'UTF-8')), ""; + echo "", stripslashes(htmlentities($event['sdesc'], ENT_QUOTES | ENT_IGNORE, 'UTF-8')), ""; // End link if ($event['url']) { echo ""; } @@ -659,8 +659,8 @@ // If we have an URL, print it out if ($event['url']) { echo '

URL: ', - '', - htmlentities($event['url'], ENT_QUOTES, 'UTF-8'), ''; + '', + htmlentities($event['url'], ENT_QUOTES | ENT_IGNORE, 'UTF-8'), ''; } ?> Modified: web/php/trunk/include/prepend.inc =================================================================== --- web/php/trunk/include/prepend.inc 2010-10-28 20:18:09 UTC (rev 304979) +++ web/php/trunk/include/prepend.inc 2010-10-29 12:08:16 UTC (rev 304980) @@ -15,6 +15,13 @@ date_default_timezone_set("UTC"); } +// As of PHP 5.3.0 multibyte sequence errors are no longer +// silent. Prior to that version this bitfield does not exist +// so define it to prevent notices on older versions +if (!defined("ENT_IGNORE")) { + define("ENT_IGNORE", 0); +} + // Prevent cross site scripting problems unset($RSIDEBAR_DATA); unset($SIDEBAR_DATA); Modified: web/php/trunk/my.php =================================================================== --- web/php/trunk/my.php 2010-10-28 20:18:09 UTC (rev 304979) +++ web/php/trunk/my.php 2010-10-29 12:08:16 UTC (rev 304980) @@ -117,10 +117,10 @@ $langpref, "Last seen language" => - (isset($_COOKIE['LAST_LANG']) ? htmlentities($_COOKIE['LAST_LANG'], ENT_QUOTES) : "None"), + (isset($_COOKIE['LAST_LANG']) ? htmlentities($_COOKIE['LAST_LANG'], ENT_QUOTES | ENT_IGNORE, 'UTF-8') : "None"), "Your Accept-Language browser setting" => - (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? htmlentities($_SERVER['HTTP_ACCEPT_LANGUAGE'], ENT_QUOTES) : "None"), + (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? htmlentities($_SERVER['HTTP_ACCEPT_LANGUAGE'], ENT_QUOTES | ENT_IGNORE, 'UTF-8') : "None"), "The mirror's default language" => default_language(), Modified: web/php/trunk/source.php =================================================================== --- web/php/trunk/source.php 2010-10-28 20:18:09 UTC (rev 304979) +++ web/php/trunk/source.php 2010-10-29 12:08:16 UTC (rev 304980) @@ -41,7 +41,7 @@ exit; } -echo "

Source of: " . htmlentities($_GET['url']) . "

"; +echo "

Source of: " . htmlentities($_GET['url'], ENT_IGNORE, 'UTF-8') . "

"; // Get dirname of the specified URL part $dir = dirname($_GET['url']); Modified: web/php/trunk/submit-event.php =================================================================== --- web/php/trunk/submit-event.php 2010-10-28 20:18:09 UTC (rev 304979) +++ web/php/trunk/submit-event.php 2010-10-29 12:08:16 UTC (rev 304980) @@ -178,8 +178,8 @@ Start Date - - " /> + + " /> /> @@ -188,8 +188,8 @@ End Date - - " /> + + " /> /> @@ -205,11 +205,11 @@ Short Description - + URL - + Country @@ -234,13 +234,13 @@ Email -
+
This email address is only used to contact you about the listing, it will not displayed along with the listing. Long Description - + @@ -265,7 +265,7 @@ foreach ($options as $k => $v) { echo '\n"; + '>', htmlentities($v, ENT_QUOTES | ENT_IGNORE, 'UTF-8'), "\n"; } }