Security
- Fixes GHSA-5fmc-v4p3-pqpg: on pages that show user-supplied HTML, a
data-pace-optionsattribute in that HTML could polluteObject.prototypeor inject HTML through theclassNameoption. Thanks to @jackfromeast for the report and proof of concept, @glunn for the proposed fix, and @Maxim-Malevich for flagging the code.
Changes
data-pace-optionsis now read only from a<script>tag, as the README has always shown. If you put it on another element, move it to pace's<script>tag or usewindow.paceOptions.- pace now works on pages that enforce Trusted Types.
- package.json names the default theme in a
stylefield, so CDNs like jsDelivr find the CSS file.
Documentation
- The README's option examples now work (
window.paceOptionsordata-pace-options, set before pace.js loads), and it explains trackingPOSTrequests,ignoreURLs,Pace.trackandPace.ignore, and restart rules. - CDN links use
pace-js@1, which stays on 1.x.
Upgrading
Nothing to change unless you put data-pace-options on an element other than pace's <script> tag.