8000 [VarDumper] Minor tweaks to html/css dumps · symfony/symfony@3b83fe1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3b83fe1

Browse files
[VarDumper] Minor tweaks to html/css dumps
1 parent 3d9ad54 commit 3b83fe1

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/open.css.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ a.doc:hover {
6464

6565
.anchor {
6666
position: relative;
67-
top: -7em;
67+
padding-top: 7em;
68+
margin-top: -7em;
6869
visibility: hidden;
6970
}

src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ protected function style($style, $value, $attr = array())
496496
$attr['href'] = $href;
497497
}
498498
if (isset($attr['href'])) {
499-
$v = sprintf('<a href="%s">%s</a>', esc($this->utf8Encode($attr['href'])), $v);
499+
$v = sprintf('<a href="%s" target="_blank" rel="noopener noreferrer">%s</a>', esc($this->utf8Encode($attr['href'])), $v);
500500
}
501501
if (isset($attr['lang'])) {
502502
$v = sprintf('<code class="%s">%s</code>', esc($attr['lang']), $v);

src/Symfony/Component/VarDumper/Tests/Caster/StubCasterTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function testLinkStub()
100100

101101
$expectedDump = <<<'EODUMP'
102102
<foo></foo><bar><span class=sf-dump-note>array:1</span> [<samp>
103-
<span class=sf-dump-index>0</span> => "<a href="%sStubCasterTest.php:0"><span class=sf-dump-str title="55 characters">Symfony\Component\VarDumper\Tests\Caster\StubCasterTest</span></a>"
103+
<span class=sf-dump-index>0</span> => "<a href="%sStubCasterTest.php:0" target="_blank" rel="noopener noreferrer"><span class=sf-dump-str title="55 characters">Symfony\Component\VarDumper\Tests\Caster\StubCasterTest</span></a>"
104104
</samp>]
105105
</bar>
106106
EODUMP;
@@ -120,7 +120,7 @@ public function testClassStub()
120120

121121
$expectedDump = <<<'EODUMP'
122122
<foo></foo><bar><span class=sf-dump-note>array:1</span> [<samp>
123-
<span class=sf-dump-index>0</span> => "<a href="%sFooInterface.php:10"><span class=sf-dump-str title="5 characters">hello</span></a>"
123+
<span class=sf-dump-index>0</span> => "<a href="%sFooInterface.php:10" target="_blank" rel="noopener noreferrer"><span class=sf-dump-str title="5 characters">hello</span></a>"
124124
</samp>]
125125
</bar>
126126
EODUMP;
@@ -161,7 +161,7 @@ public function testClassStubWithNotExistingMethod()
161161

162162
$expectedDump = <<<'EODUMP'
163163
<foo></foo><bar><span class=sf-dump-note>array:1</span> [<samp>
164-
<span class=sf-dump-index>0</span> => "<a href="%sFooInterface.php:5"><span class=sf-dump-str title="5 characters">hello</span></a>"
164+
<span class=sf-dump-index>0</span> => "<a href="%sFooInterface.php:5" target="_blank" rel="noopener noreferrer"><span class=sf-dump-str title="5 characters">hello</span></a>"
165165
</samp>]
166166
</bar>
167167
EODUMP;

0 commit comments

Comments
 (0)
0