Preventing that “recursive” behaviour is quite simple, but shouldn't the signature be stored as raw “bbcode” and converted to html only when displayed ? I see something like body and body_html for the posts.
If you want I can work on it .. but first this patch