Added getTarget for handling of trailing slashes in target URL
Fixes issue #16691
- Corrected spaces around braces.
- Removed handling of options.
- Removed `allowNoTrailingSlash` parameter. Always use `getTarget`
Replaced `match` with `charAt`
Merge remote-tracking branch 'two/master'