Skip to content

Conversation

@dethrophes
Copy link

Rules like the following break the dot xml format.
-A PREROUTING -m u32 --u32 "0x6>>0x18=0x6" -j ACCEPT



xml_esc = {
re.compile('&') : '&' ,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about over-long characters in UTF-8 and <![CDATA[ for XHTML? I think, better to use ready to use library than trying to escape only limited set of characters by handwritten code. Moreover, substitution by multiple regular expressions is very ineffective (as same symbol in each line must be reviewed multiple times). And such approach is error-prone, as the whole result depend on the orded in which you are applying substitutions. You can construct a single regular expression for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants