Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
44433cc888
@ -97,16 +97,10 @@ function PMA_sanitize($message, $escape = false, $safe = false)
|
||||
}
|
||||
/* Interpret bb code */
|
||||
$replace_pairs = array(
|
||||
'[i]' => '<em>', // deprecated by em
|
||||
'[/i]' => '</em>', // deprecated by em
|
||||
'[em]' => '<em>',
|
||||
'[/em]' => '</em>',
|
||||
'[b]' => '<strong>', // deprecated by strong
|
||||
'[/b]' => '</strong>', // deprecated by strong
|
||||
'[strong]' => '<strong>',
|
||||
'[/strong]' => '</strong>',
|
||||
'[tt]' => '<code>', // deprecated by CODE or KBD
|
||||
'[/tt]' => '</code>', // deprecated by CODE or KBD
|
||||
'[code]' => '<code>',
|
||||
'[/code]' => '</code>',
|
||||
'[kbd]' => '<kbd>',
|
||||
@ -115,7 +109,8 @@ function PMA_sanitize($message, $escape = false, $safe = false)
|
||||
'[/a]' => '</a>',
|
||||
'[sup]' => '<sup>',
|
||||
'[/sup]' => '</sup>',
|
||||
'[conferr]' => '<iframe src="show_config_errors.php" />' // used in common.inc.php
|
||||
// used in common.inc.php:
|
||||
'[conferr]' => '<iframe src="show_config_errors.php" />',
|
||||
);
|
||||
/* Adjust links for setup, which lives in subfolder */
|
||||
if (defined('PMA_SETUP')) {
|
||||
|
||||
@ -213,7 +213,7 @@ if (isset($_REQUEST['adduser_submit']) || isset($_REQUEST['change_copy'])) {
|
||||
. " AND `Host` = '" . $common_functions->sqlAddSlashes($hostname) . "';";
|
||||
if (PMA_DBI_fetch_value($sql) == 1) {
|
||||
$message = PMA_Message::error(__('The user %s already exists!'));
|
||||
$message->addParam('[i]\'' . $username . '\'@\'' . $hostname . '\'[/i]');
|
||||
$message->addParam('[em]\'' . $username . '\'@\'' . $hostname . '\'[/em]');
|
||||
$_REQUEST['adduser'] = true;
|
||||
$_add_user_error = true;
|
||||
} else {
|
||||
|
||||
@ -285,15 +285,15 @@ class PMA_Message_test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
'[i]test[/i][i]aa[i/][em]test[/em]',
|
||||
'<em>test</em><em>aa[i/]<em>test</em>'
|
||||
'[em]test[/em][em]aa[em/][em]test[/em]',
|
||||
'<em>test</em><em>aa[em/]<em>test</em>'
|
||||
),
|
||||
array(
|
||||
'[b]test[/b][strong]test[/strong]',
|
||||
'[strong]test[/strong][strong]test[/strong]',
|
||||
'<strong>test</strong><strong>test</strong>'
|
||||
),
|
||||
array(
|
||||
'[tt]test[/tt][code]test[/code]',
|
||||
'[code]test[/code][code]test[/code]',
|
||||
'<code>test</code><code>test</code>'
|
||||
),
|
||||
array(
|
||||
|
||||
@ -107,7 +107,7 @@ class PMA_sanitize_test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
$this->assertEquals(
|
||||
'<strong>strong</strong>',
|
||||
PMA_sanitize('[b]strong[/b]')
|
||||
PMA_sanitize('[strong]strong[/strong]')
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user