From 8c9d461a6259d7b8ac4ae5c9c9e95ab176cfcda3 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Sat, 18 Feb 2012 11:25:59 -0500 Subject: [PATCH] Bugfix: _blank not blank. Signed-off-by: Edward Z. Yang --- library/HTMLPurifier/AttrTransform/TargetBlank.php | 2 +- tests/HTMLPurifier/HTMLModule/TargetBlankTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/HTMLPurifier/AttrTransform/TargetBlank.php b/library/HTMLPurifier/AttrTransform/TargetBlank.php index a6502c74..deba8b40 100644 --- a/library/HTMLPurifier/AttrTransform/TargetBlank.php +++ b/library/HTMLPurifier/AttrTransform/TargetBlank.php @@ -26,7 +26,7 @@ class HTMLPurifier_AttrTransform_TargetBlank extends HTMLPurifier_AttrTransform $scheme = $url->getSchemeObj($config, $context); if ($scheme->browsable && !$url->isBenign($config, $context)) { - $attr['target'] = 'blank'; + $attr['target'] = '_blank'; } return $attr; diff --git a/tests/HTMLPurifier/HTMLModule/TargetBlankTest.php b/tests/HTMLPurifier/HTMLModule/TargetBlankTest.php index a757fecb..eb6208a8 100644 --- a/tests/HTMLPurifier/HTMLModule/TargetBlankTest.php +++ b/tests/HTMLPurifier/HTMLModule/TargetBlankTest.php @@ -11,7 +11,7 @@ class HTMLPurifier_HTMLModule_TargetBlankTest extends HTMLPurifier_HTMLModuleHar function testTargetBlank() { $this->assertResult( 'abc', - 'abc' + 'abc' ); }