Skip to content

Commit

Permalink
Add tests to do not remove quotes when attributes contains whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasMesquitaBorges committed May 2, 2020
1 parent c09b69f commit 4f1c271
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/Boilerplate/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,16 @@ <h1>Test Background Image</h1>
</div>
<img src="http://emblemsbf.com/img/18346.jpg" width="250" style="height:300px; padding:10px" />

<img src="tile whitespace.png" width="250" style="height:300px; padding:10px"/>

<form method="get" class="form" style="display:block;border:1px solid red;">

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

<input type="text" name="name with spaces" value="name with spaces" width="100%">

<select style="height:300px; padding:10px">
<option selected="selected" class="selected" style="cursor: default">Item</option>
<option selected=selected>Item</option>
Expand Down
2 changes: 2 additions & 0 deletions tests/Middleware/RemoveQuotesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,7 @@ public function testRemoveQuotes()
$this->assertContains('<img src=http://emblemsbf.com/img/18346.jpg width=250 style="height:300px; padding:10px" >', $response->getContent());
$this->assertContains('<img src=/images/1000coin.png>', $response->getContent());
$this->assertContains('<vue-component :src="\'src\'" :type="\'type\'" :width="200"></vue-component>', $response->getContent());
$this->assertContains('<img src="tile whitespace.png" width=250 style="height:300px; padding:10px">', $response->getContent());
$this->assertContains('<input type=text name="name with spaces" value="name with spaces" width=100%>', $response->getContent());
}
}

0 comments on commit 4f1c271

Please sign in to comment.