Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateHTMLClayID ¶
GenerateHTMLClayID generates a UUID v4 using crypto/rand.
func HasHTMLTag ¶
HasHTMLTag reports whether data contains a real top-level <html> start tag, ignoring any <html occurrence inside a comment. Used to reject a save body that is not a full HTML document before it overwrites a file.
func InjectHTMLClayID ¶
InjectHTMLClayID adds htmlclayid to <html> if not already present. This is persistent — never stripped on save.
func InjectToken ¶
InjectToken injects the htmlclaytoken attribute on <html>. Ephemeral auth token — stripped on save.
func ReadHTMLClayID ¶
ReadHTMLClayID extracts the htmlclayid UUID from the <html> tag. Returns empty string if not present.
func StripToken ¶
StripToken removes the htmlclaytoken attribute from <html>.
Types ¶
This section is empty.