Allowed Attributes in Wikitext
Wikidot has an arbitrary and inconsistent limit of which attributes are passed from blocks into HTML tags. It’s usually id, class, style, and possibly other attributes when Wikidot developers remembered.
However we shouldn’t just all all attributes through, as they could run trusted scripts or expose other security issues.
Instead we have a premade list of which attributes are permitted and which are not:
Attribute Name | Affected HTML Elements | Allowed? | Rationale |
|---|---|---|---|
|
| YES | Affects the behavior of a file picker. |
|
| NO | The character set should be set at the platform level. |
| Global attribute | NO | Could be used to hijack user focus. |
|
| NO | Allows submitting a form to an arbitrary destination. |
|
| YES | Cosmetic attribute. |
|
| NO | Can permit the child iframe to have access to browser resources like the microphone. |
|
| YES | Alt text is important for accessibility. |
| Global attribute | YES | Permits users to add ARIA attributes to enhance accessibility. |
|
| NO | Only affects scripts, which users cannot load. |
| Global attribute | YES | Affects capitalization in input fields. |
|
| NO | Could be used to steal credentials by mimicking username or password fields. |
|
| NO | Could be used to hijack user focus. |
|
| YES | Users can configure their browsers to block this, and it can be used to narrative effect. |
|
| YES | Cosmetic attribute. |
|
| YES | Cosmetic attribute. |
|
| YES | Cosmetic attribute. |
|
| YES | Optimizing media buffering. |
|
| NO | Allows media capture resources (e.g. camera) to be accessed. |
|
| NO | Deprecated and involves a security mechanism. |
|
| NO | The character set should be set at the platform level. |
|
| YES | Affects whether an input starts with a truthy value. |
|
| YES | Allows citing the origin of contained elements. |
| Global attribute. | YES | Cosmetic attribute. |
|
| NO | Applets are not permitted. |
|
| NO | Applets are not permitted. |
|
| NO | Only permitted on |
|
| YES | Cosmetic attribute. |
|
| YES | Cosmetic attribute. |
|
| NO | Meta attributes are set at the site level. |
| Global attribute. | YES | Allows changing intractability of static elements. |
| Global attribute. | NO | Experimental attribute. |
|
| YES | Allows exposing media controls. |
|
| YES | Cosmetic attribute. |
|
| NO | Affecting cross-origin settings is a possible security issue. |
|
| NO | Experimental attribute. |
| Global attribute. | YES | Allows users to add data tags to their DOM elements. |
|
| YES | Useful metadata. |
|
| YES | Allows optimizing page rendering. |
|
| YES | Configures media player behavior. |
|
| NO | Only affects scripts, which users cannot load. |
| Global attribute. | YES | Allows setting text direction for cosmetics and internationalization. |
|
| YES | Input field customization. |
|
| YES | Affects field interactivity. |
|
| YES | Allows links to force a download. |
| Global attribute. | YES | Allows making elements as draggable. |
|
| NO | Forms are not allowed to |
|
| NO | Experimental attribute. |
|
| YES | Allows parenting elements. |
|
| YES | Allows constructing forms. |
|
| NO | Allows setting a form’s action. |
|
| NO | Allows setting a form’s content type. |
|
| NO | Allows setting a form’s method type. |
|
| NO | Allows setting a form’s validation type. |
|
| NO | Allows setting a form’s target. |
|
| YES | Deprecated. However, it is widely used on Wikidot and is safe to permit users to set. |
|
| YES | Customizing the IDs of table elements. |
|
| YES | Cosmetic attribute. |
| Global attribute. | YES | Cosmetic attribute. |
|
| YES | Allows customizing a meter element. |
|
|