Preserving special characters during conversion HTML -> BBCode