Duplicates
Latest version
Current behavior 😯
Only some links get crawled and prerendered
Expected behavior 🤔
All available links on pages should get crawled and prerendered
Steps to reproduce 🕹
Steps:
Context 🔦
Happens because Nitro's html parser (https://github.com/natemoo-re/ultrahtml) doesn't handle un-quoted attributes properly (natemoo-re/ultrahtml#82). Workaround we'll implement is to detect prerendering and requote the data-hk attributes.
if (event.request.headers.get("x-nitro-prerender")) {
const _html = await stream;
const html = _html.replaceAll(/data-hk=(\d+)(?=\s|>)/g, 'data-hk="$1"');
return html
}
Your environment 🌎
Duplicates
Latest version
Current behavior 😯
Only some links get crawled and prerendered
Expected behavior 🤔
All available links on pages should get crawled and prerendered
Steps to reproduce 🕹
Steps:
Context 🔦
Happens because Nitro's html parser (https://github.com/natemoo-re/ultrahtml) doesn't handle un-quoted attributes properly (natemoo-re/ultrahtml#82). Workaround we'll implement is to detect prerendering and requote the
data-hkattributes.Your environment 🌎