Problem/Motivation
We are including tokens into href's (once converted it will be a valid URL). Because of the "Correct invalid HTML" filter, the token will br stripped, and this is called sometimes when editing the content and breaks the token. We have then converted the token into a proper URL, it now passes through the filter without breaking the token. However they are now being converted by linky.
Steps to reproduce
If we convert a token to something like "/?tok=[node:url]" linky will convert this into a entity.
Proposed resolution
Add a config entry which will be a regular expression to give full flexibility. We can add this to \Drupal\linkyreplacer\LinkyEntityUtility::getLinkyByHref() to do something similar to the check if the link is a linkly link.
| Comment | File | Size | Author |
|---|
Issue fork linkyreplacer-3387452
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
gordon commentedComment #3
gordon commentedThis was a pretty small change with a new config entry.
Comment #4
jibranWe need a post update hook to update the existing config.
We need some kind of validation for valid regex.
We need tests for this.
Comment #5
gordon commentedComment #6
gordon commented1. I have fixed up the typo and added in an update to update to set the default value.
2. I have looked into this and to test the regular expression is to use preg_match(). If the expression is invalid it will return false, as opposed to not matching which will return 0.
3. I have added in a test to check the if the exclusion will work.