raises: add missing | metacharacter to is_fully_escaped and unescape by bysiber · Pull Request #14222 · pytest-dev/pytest

@bysiber @bluetech

The pipe character is a regex metacharacter (alternation operator) but
is_fully_escaped did not include it, so a match pattern like '^foo|bar$'
would be wrongly identified as a fully-escaped literal. This causes
rawmatch to be set incorrectly, leading to misleading diff output on
match failure.

Also add | to the unescape function's character class for consistency.

bluetech