Html encode bugfix when removing tags