diff --git a/libraries/core.lib.php b/libraries/core.lib.php
index 3d4484b8f9..3877548c34 100644
--- a/libraries/core.lib.php
+++ b/libraries/core.lib.php
@@ -590,26 +590,10 @@ function PMA_sendHeaderLocation($uri, $use_refresh = false)
include_once './libraries/js_escape.lib.php';
PMA_Response::getInstance()->disable();
- echo '
- - -' . "\n";
- echo '' . "\n";
- echo '' . "\n";
- echo '' . "\n";
- echo '' . "\n";
- echo '' . "\n";
- echo '' . "\n";
- echo '' . "\n";
- echo '' . "\n";
+ include_once './libraries/Template.class.php';
+
+ echo PMA\Template::get('header_location')
+ ->render(array('uri' => $uri));
return;
}
diff --git a/templates/header_location.phtml b/templates/header_location.phtml
new file mode 100644
index 0000000000..957441727f
--- /dev/null
+++ b/templates/header_location.phtml
@@ -0,0 +1,21 @@
+
+
+ - - -
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/libraries/core/PMA_headerLocation_test.php b/test/libraries/core/PMA_headerLocation_test.php
index 925ebcbf9b..7eb69d98f4 100644
--- a/test/libraries/core/PMA_headerLocation_test.php
+++ b/test/libraries/core/PMA_headerLocation_test.php
@@ -257,26 +257,17 @@ class PMA_HeaderLocation_Test extends PHPUnit_Framework_TestCase
$testUri_html = htmlspecialchars($testUri);
$testUri_js = PMA_escapeJsString($testUri);
- $header = "- - -\n" .
- "\n" .
- "\n" .
- "\n" .
- "\n" .
- "\n" .
- "\n" .
- "\n" .
- "\n";
+ $header = "- - -
+ "
+ . ""
+ . ""
+ . ""
+ . "
+";
$this->expectOutputString($header);