External Link Control 1.6158.1440 #37
thisismyurl
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Two fixes in this one, no behavior change to how the plugin handles your links, and nothing you need to do after updating.
If you spent any time on the plugin's settings page recently, you might have noticed something odd at the bottom: instead of a tidy "by thisismyurl.com" attribution link, you saw the raw HTML for it. The actual
<a href="...">tag printed as visible text. Mildly ugly, completely harmless, and now fixed.Here's what was happening, in case you hit the same pattern in your own code. The byline was built by passing an HTML link as the argument to
esc_html__(). That function escapes the whole string it's handed, so the<a>tag got encoded into visible characters rather than rendered as a link. The fix was to escape the translated text and the link separately, then run the result throughwp_kses()with an allowlist that permits only the anchor tag and its attributes. The link renders properly now, and the output is still safely escaped.I want to be straight about the stakes: this one is cosmetic. It's the attribution line in the admin screen, nothing your visitors ever see, and nothing that touched how external links get their
relandtargetattributes.The second change is pure housekeeping. The version constant used to enqueue the admin JS and CSS had drifted out of sync with the plugin header, so I lined them back up. That keeps cache-busting honest when assets change.
That's the whole release. Update whenever you next touch the site.
All reactions