• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

romshark / datapages / 36180018610

25 Sep 2026 07:22PM UTC coverage: 39.699% (+0.07%) from 39.63%
36180018610

push

github

romshark
fix: Escape SSE.Prefetch URLs

datastar-go writes prefetch URLs raw inside JSON in a script element.
An attacker-controlled quote and closing tag can escape both contexts
and run JavaScript in the page's origin (XSS).

The custom encoder avoids encoding/json's extra allocs on common path.
44 -> 20 allocs and 1,108 ns -> 377 ns per call for three URLs.

41 of 41 new or added lines in 1 file covered. (100.0%)

1 existing line in 1 file now uncovered.

14170 of 35694 relevant lines covered (39.7%)

34.33 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.14
/runtime/httpserve/core.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc