Software /
code /
prosody-modules
Comparison
mod_xhtmlim/mod_xhtmlim.lua @ 3699:1f68287138e3
mod_xhtmlim: Default to stripping @style attribute by default
Proper sanitation would require a CSS parser, easier and probably best
for everyone to just strip by default.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 08 Oct 2019 18:35:48 +0200 |
parent | 3404:6444fb5dbb51 |
comparison
equal
deleted
inserted
replaced
3698:1d719d4ef18f | 3699:1f68287138e3 |
---|---|
3 local assert = assert; | 3 local assert = assert; |
4 | 4 |
5 local st = require "util.stanza"; | 5 local st = require "util.stanza"; |
6 local url = require "socket.url"; | 6 local url = require "socket.url"; |
7 | 7 |
8 local no_styles = module:get_option_boolean("strip_xhtml_style", false); | 8 local no_styles = module:get_option_boolean("strip_xhtml_style", true); |
9 | 9 |
10 -- Tables from XEP-0071 | 10 -- Tables from XEP-0071 |
11 local xeptables = [[ | 11 local xeptables = [[ |
12 <body/> class, id, title; style | 12 <body/> class, id, title; style |
13 <head/> profile | 13 <head/> profile |