resolves #695 allow spaces in reftext defined in block anchor

- also recognize only legal characters in id