# not allowed to create account with these as username DISALLOWED_USERNAMES = [ "about", "abuse", "account", "accounts", "admin", "administration", "administrator", "api", "atom", "auth", "authentication", "billing", "blog", "blogs", "bot", "cdn", "collection", "config", "contact", "dash", "dashboard", "developer", "developers", "docs", "documentation", "help", "helpcenter", "home", "image", "images", "img", "index", "irc", "knowledgebase", "legal", "login", "logout", "man", "manual", "meta", "metrics", "on", "ops", "pricing", "privacy", "profile", "random", "register", "registration", "robot", "search", "server", "settings", "setup", "signin", "signup", "smtp", "static", "status", "support", "terms", "test", "tests", "tmp", "up", "uptime", "wiki", "www", ] # not allowed to create a blog page with these as slugs DISALLOWED_PAGE_SLUGS = [ "analytics", "billing", "blog", "dashboard", "export", "halsey", "images", "import", "newsletter", "notifications", "pages", "rss", "webring", ] # elements allowed to exist inside the HTML of a markdown text ALLOWED_HTML_ELEMENTS = [ "a", "abbr", "acronym", "article", "audio", "b", "bdi", "bdo", "blockquote", "br", "cite", "code", "colgroup", "dd", "del", "details", "dfn", "div", "dl", "dt", "em", "figcaption", "figure", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "kbd", "li", "mark", "ol", "p", "pre", "q", "rb", "rt", "rtc", "ruby", "s", "samp", "section", "small", "span", "strong", "sub", "summary", "sup", "table", "tbody", "td", "th", "thead", "time", "tr", "u", "ul", "var", "wbr", ] # see https://developer.mozilla.org/en-US/docs/Web/MathML/Reference/Element mathml_elements = [ "math", # "maction", # depracated "annotation", "annotation-xml", # "memclose", # non-standard "merror", # "mfenced", # depracated "mfrac", "mi", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mprescript", "mroot", "mrow", "ms", "semantics", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", ] ALLOWED_HTML_ELEMENTS += mathml_elements # attributes allowed to exist inside the elements of the HTML of a markdown text ALLOWED_HTML_ATTRS = [ "align", "allowfullscreen", "alt", "class", "controls", "frameborder", "height", "href", "id", "name", "preload", "rel", "seamless", "span", "src", "start", "style", "target", "title", "width", ] # https://developer.mozilla.org/en-US/docs/Web/MathML/Reference/Attribute # unsure if these are required for mathml to work? we could ask the `latex2mathml` project what attributes they use. mathml_attrs = [ # ### global attributes -> there are more see https://developer.mozilla.org/en-US/docs/Web/MathML/Reference/Global_attributes "displaystyle", "mathbackground", "mathcolor", "mathsize", "scriptlevel", # ### non-global "accent", "accentunder", # "actiontype", # depracated "align", # "background", # depracated # "close", # depracated # "color", # depracated "columnalign", "columnlines", "columnspacing", "columnspan", # "denomalign", # depracated "depth", "dir", "display", "displaystyle", "fence", # "fontfamily", # depracated # "fontsize", # depracated # "fontstyle", # depracated # "fontweight", # depracated "frame", "framespacing", "height", "href", "id", "linethickness", "lspace", "lspace", # "lquote", # depracated "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", # "numalign", # depracated # "open", # depracated "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", # "rspace", # depracated "scriptlevel", # "scriptminsize", # depracated # "scriptsizemultiplier", # depracated # "selection", # depracated "separator", # "separators", # depracated "stretchy", # "subscriptshift", # depracated # "superscriptshift", # depracated "symmetric", "voffset", "width", "xmlns", ] ALLOWED_HTML_ATTRS += mathml_attrs # css rules allowed to exist as inline styles on HTML elements of a markdown text ALLOWED_CSS_STYLES = [ "background", "border", "border-radius", "box-shadow", "color", "display", "font-family", "font-size", "height", "margin", "padding", "width", ] # control characters of unicode category Cc except for \t, \n, \r DISALLOWED_CHARACTERS = [ "\x00", "\x01", "\x02", "\x03", "\x04", "\x05", "\x06", "\x07", "\x08", "\x0b", "\x0c", "\x0e", "\x0f", "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f", "\x7f", "\x80", "\x81", "\x82", "\x83", "\x84", "\x85", "\x86", "\x87", "\x88", "\x89", "\x8a", "\x8b", "\x8c", "\x8d", "\x8e", "\x8f", "\x90", "\x91", "\x92", "\x93", "\x94", "\x95", "\x96", "\x97", "\x98", "\x99", "\x9a", "\x9b", "\x9c", "\x9d", "\x9e", "\x9f", ]