[Bug report] Undecorated external links #1902
Replies: 1 comment 1 reply
-
@bttrx |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Operating system
Linux Mint 22 MATE
Publii version
0.46.2 (build 16966)
Issue type
Free plugin
Bug description
<a title="Title" href="https://www.example.com">Example.com</a>
will not be decorated by the External Links Plugin. Swapping title and href attributes will make the decoration work.The problem is the regex in this line in
main.js
:The regex works fine for links generated by the WYSIWYG editor, because it uses 'a href title...' order, but expect users to use direct HTML mode. (I didn't test the block or Markdown editor.)
<a(?:\s+?.*?)+?href="(http[s]?):\/\/([^"]*)"(.*?)>(.*?)<\/a>
works better for me on https://regex101.com/, but I failed to make it work with Publii. I don't know Node.js.Steps to reproduce
No response
Relevant log output
No response
Beta Was this translation helpful? Give feedback.
All reactions