Skip to content

Commit 4f1c271

Browse files
Add tests to do not remove quotes when attributes contains whitespaces
1 parent c09b69f commit 4f1c271

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

tests/Boilerplate/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,16 @@ <h1>Test Background Image</h1>
3030
</div>
3131
<img src="http://emblemsbf.com/img/18346.jpg" width="250" style="height:300px; padding:10px" />
3232

33+
<img src="tile whitespace.png" width="250" style="height:300px; padding:10px"/>
34+
3335
<form method="get" class="form" style="display:block;border:1px solid red;">
3436

3537
<input type="text" disabled="true" value="teste" width="100%">
3638
<input type="text" disabled="true">
3739
<input style="border:1px solid red" type="text" disabled=true>
3840

41+
<input type="text" name="name with spaces" value="name with spaces" width="100%">
42+
3943
<select style="height:300px; padding:10px">
4044
<option selected="selected" class="selected" style="cursor: default">Item</option>
4145
<option selected=selected>Item</option>

tests/Middleware/RemoveQuotesTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,7 @@ public function testRemoveQuotes()
2222
$this->assertContains('<img src=http://emblemsbf.com/img/18346.jpg width=250 style="height:300px; padding:10px" >', $response->getContent());
2323
$this->assertContains('<img src=/images/1000coin.png>', $response->getContent());
2424
$this->assertContains('<vue-component :src="\'src\'" :type="\'type\'" :width="200"></vue-component>', $response->getContent());
25+
$this->assertContains('<img src="tile whitespace.png" width=250 style="height:300px; padding:10px">', $response->getContent());
26+
$this->assertContains('<input type=text name="name with spaces" value="name with spaces" width=100%>', $response->getContent());
2527
}
2628
}

0 commit comments

Comments
 (0)