diff --git a/ChangeLog b/ChangeLog index 8aca42558..2296c7e7d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA - bug #1914066 [core] ForceSSL generates incorrectly escaped redirections (this time with the correct fix) + [lang] Hungarian update, thanks to Jozsef Tamas Herczeg - dodika +- bug #2153970 [core] Properly truncate SQL to avoid half of html tags 3.0.0.0 (2008-09-27) + [export] properly handle line breaks for YAML, thanks to Dan Barry - diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 5ad789149..1af799a71 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -1022,7 +1022,7 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice') // when the query is large (for example an INSERT of binary // data), the parser chokes; so avoid parsing the query $query_too_big = true; - $query_base = nl2br(htmlspecialchars($sql_query)); + $shortened_query_base = nl2br(htmlspecialchars(substr($sql_query, 0, $cfg['MaxCharactersInDisplayedSQL']) . '[...]')); } elseif (! empty($GLOBALS['parsed_sql']) && $query_base == $GLOBALS['parsed_sql']['raw']) { // (here, use "! empty" because when deleting a bookmark, @@ -1177,7 +1177,7 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice') echo ''; if ($query_too_big) { - echo substr($query_base, 0, $cfg['MaxCharactersInDisplayedSQL']) . '[...]'; + echo $shortened_query_base; } else { echo $query_base; }