```ruby
require 'test_helper'

class StatsTest < SystemTest
  test "page params is not integer" do
    visit '/stats?page="3\">XSS"'
    assert page.has_content? "Stats"
  end
end
```

Fix URI::InvalidURIError: bad URI(is not URI?) in stats test
user
```ruby
require 'test_helper'

class StatsTest < SystemTest
  test "page params is not integer" do
    string_param_path = '/stats?page="3\""'
    visit URI.encode(string_param_path)
    assert page.has_content? "Stats"
  end
end
```
assistant