You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Rails 7页面出现随机字符‘s’,源码无显示求助排查

Rails 7页面出现随机字符‘s’排查求助

在Rails 7环境下,页面中莫名出现一个随机字符‘s’,我初步判断这不是Rails/ERB层面的问题。

问题中的‘s’显示效果:
随机字符S

通过浏览器审查工具查看的渲染代码中完全没有‘s’:

<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>

但页面截图中能清晰看到这个‘s’:
页面显示的‘s’与对应代码对比

我已经在CSS/SCSS文件中全局搜索,没有发现任何使用:before或:after伪元素插入内容的语句。

恳请各位帮忙排查这个字符的来源。

内容的提问来源于stack exchange,提问作者Liz

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.05 20:48:36