When creating a new entity internal URLs don't work correctly for some formats:
- Pass: /mypath
- Pass: mypath?key=value
- Fail: /mypath?key=value
Updating an entity with #3 above works fine as entity updates don't require the validation to pass, if validation fails the code falls back to an external URL. #1 above passes as it's valid for the internal_pattern_file regex, #2 passes as it's valid for internal_pattern. But the last fails with the error:
The value /mypath?key=value provided for My Path Link is not a valid URL.
This is because the first part of the internal_path doesn't allow the / character.
Comments
Comment #2
hadsie commentedComment #3
hadsie commentedComment #4
damienmckennaThanks for uncovering that bug and providing a patch.
I think we just need some test coverage.
Comment #5
damienmckennaTest coverage.
Comment #6
damienmckennaTests-only.
Comment #7
damienmckennaComment #9
damienmckennaThe tests-only patch fails, which is expected. I think this is good to go.
Comment #11
damienmckennaCommitted. Thank you!