B
birgit
I have the following problem to solve with regular expressions:
An editor can enter data through a webfronted editor. Certain HTML Tag
are allowed others are not. When he saves the data the content should
be check using regular expressions.
- only chars of the ISO-8859-1 charset are allowed
- only <b>, </b>, <br />, <a ...> and </a> tags are allowed (no other
HTML Tags)
The HTML-Tags don't need to get deleted. The user only gets an error
message telling him to change his data according to the rules.
I know how to check for the charset:
[\u0000-\u00FF]*
But I don't know how to combine this with the other rules. I'd
appreciate any help.
An editor can enter data through a webfronted editor. Certain HTML Tag
are allowed others are not. When he saves the data the content should
be check using regular expressions.
- only chars of the ISO-8859-1 charset are allowed
- only <b>, </b>, <br />, <a ...> and </a> tags are allowed (no other
HTML Tags)
The HTML-Tags don't need to get deleted. The user only gets an error
message telling him to change his data according to the rules.
I know how to check for the charset:
[\u0000-\u00FF]*
But I don't know how to combine this with the other rules. I'd
appreciate any help.