package main import ( "html" "regexp" "strings" "unicode/utf8" ) // The printer's admin pages are small, tolerant HTML (XHTML 1.0 with unclosed inputs). Only what the module // reads is taken out of them: the title, the links, and the forms with their fields. // Link is an anchor of a page. type Link struct { Href string `json:"href"` Text string `json:"text"` } // Field is a named control of a form. A password field's value is never kept (ADR 0467 clause 4). type Field struct { Name string `json:"name"` Type string `json:"type"` Value string `json:"value"` Checked *bool `json:"checked,omitempty"` Label string `json:"label"` Options []Option `json:"options,omitempty"` id string own string // the label of this control alone: