Screeps3D
Screeps3D copied to clipboard
Strip html content from console output
You currently display all console output as plain text. html tags should either be stripped completely or interpreted to some level.
Per our conversation on slack, if you are going to support the style tag at some level, you will want to probably support the following css properties:
- color
- background-color
- text-align
- verticle-align
- margin
- margin-*
- padding
- padding-*
- border
- border-*
- font-weight
- font-size
- width
- height
- min-width
- min-height
- max-width
- max-height
- cursor
I've changed to using a script tag hoist my style tags to the document head so that it persists console clears, or if the style log line goes off the top of the console. Not sure how this would be supported unless you allowed for a noscript tag as well to embed the style tag. (https://github.com/Eeems/screeps-scripts/blob/ai/src/log.ts#L29-L40)