Issue
This is the most bizarre problem I've ever SO-ed, but there is a random "s" appearing on my code. This is on Rails 7, but I'm honestly not thinking it's a Rails/ERB issue.
Here is the code the way it's rendered (through inspect source code), in which NO S APPEARS:
<div class="search mt-3 mb-4">
<input class="form-control" id="myInput" type="text" placeholder="Filter products list...">
</div>
<div id="searchable-products-list">
<div id="products">
<table class="table small">
<thead>
<tr>
<th scope="col">Brand</th>
<th scope="col">Product</th>
<th scope="col">LGW SKU</th>
<th scope="col">Model</th>
<th scope="col">Color</th>
<th scope="col">Voltage</th>
<th scope="col">MSRP</th>
<th scope="col">MAP</th>
<th scope="col">Images</th>
<th scope="col">Actions</th>
</tr>
</thead>
<tbody>
Yet here's a screenshot of the code where the " s " is clearly visible:
I have done a command + f in my CSS/SCSS and there are no before or after statements in the entire thing.
Can anyone help me figure out where this thing is coming from?
Solution
if you have inadvertently included something like this in your page:
<table>
<tr>
<td>foo</td>s
</tr>
</table>
The html parser in the browser doesn't know what to do with the spurious 's' so it puts it before the table. Look carefully at the html you are generating, the spurious letter might not be in the place that the browser is telling you after it parses your markup.
Answered By - Les Nightingill


0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.