diff --git a/scripts/build_approved_native_gui.py b/scripts/build_approved_native_gui.py
index 5dac25f24..69c34045c 100644
--- a/scripts/build_approved_native_gui.py
+++ b/scripts/build_approved_native_gui.py
@@ -26,6 +26,23 @@
'')
SCHEMA = "arsonmix.approved-native-pages-bundle.v2"
+NATIVE_BOOT_GUARD = (
+ '\n'
+)
+
def sha256(data: bytes) -> str:
return hashlib.sha256(data).hexdigest()
@@ -263,6 +280,9 @@ def native_html(approved: str | None = None) -> str:
if html.count(before) != 1 or after in html:
raise ValueError("Native-only M2 control hook anchor drift: " + before[:55])
html = html.replace(before, after, 1)
+ if html.count("") != 1:
+ raise ValueError("Approved Pages missing unique native boot guard anchor")
+ html = html.replace("", NATIVE_BOOT_GUARD + "", 1)
html = html.replace("