If often fix minor issues in posts manually going through all of the posts on my forum on a daily basis. It turns out that most of the issues are typical and I could write a regex/rewrite rule to force the fix as soon as the message is posted or edited.
It would be nice to have such a section in admin panel with a set of rules, 2 inputs each:
- Regex (optionally introduces regex references)
- Replace with (optionally uses regex references)
Examples
- Make empty lines between paragraphs
- Place space after comma if not inside a number (this rule is specific to Russian / Ukrainian locale)
- Remove links to websites from which smile embed codes were copied, i.e.
[url=...][img...][/url]
- Place large images on their own lines and enforce an empty line before and after