Fixed percent symbols in custom blocks

This fixes issue #476