Zulip Chat Archive
Stream: Zulip meta
Topic: Broken linkifiers due to URL escaping
Eric Wieser (May 10 2023 at 18:07):
A change to Zulip has broken linkifiers like port-status#algebra/modeq#graph, as the /
and #
are no longer inserted verbatim into the URL
Eric Wieser (May 10 2023 at 18:09):
I think this is because the linkifiers now follow https://www.rfc-editor.org/rfc/rfc6570.html; from the Zulip release notes:
The URL patterns for linkifiers have been migrated from a custom format string to RFC 6570 URL templates. A database migration will automatically migrate existing linkifiers correctly in the vast majority of cases, but some fancier linkfiers may require manual adjustment to generate correct URLs following this upgrade.
Eric Wieser (May 10 2023 at 18:12):
I think the port status linkifier needs to change to port-status#(?P<file>[\w_'/-]+)(?:#(?P<fragment>[\w_'/-]+))?
https://leanprover-community.github.io/mathlib-port-status/file{/file}{#fragment}
Eric Wieser (May 10 2023 at 18:14):
file#data/int/basic is also broken
Eric Wieser (May 10 2023 at 18:16):
Scott Morrison (May 10 2023 at 21:17):
I've made the suggested change for port-status#algebra/modeq#graph, lets see if it works!
Scott Morrison (May 10 2023 at 21:17):
Seems good!
Scott Morrison (May 10 2023 at 21:18):
@Eric Wieser, since you've just deciphered this, could you also tell us the changes required for file#
and arxiv#
?
Eric Wieser (May 10 2023 at 21:22):
I think both can be fixed by replacing /{foo}
with {/foo}
Scott Morrison (May 10 2023 at 21:27):
Done, but not tested!
Eric Wieser (May 10 2023 at 21:33):
arxiv#gr-qc/9902017, file#data/int/basic
Eric Wieser (May 10 2023 at 21:37):
Not working, but I now realize I misread the RFC
Eric Wieser (May 10 2023 at 21:37):
And it seems that some web servers don't care about the difference between %2F and /
Eric Wieser (May 10 2023 at 21:39):
It's rather unfortunate that only owners of the Zulip instance can play around with this
Eric Wieser (May 10 2023 at 21:39):
Perhaps @Alya Abbott can advise if there's a test instance somewhere that I can try things out on?
Eric Wieser (May 10 2023 at 21:41):
@Scott Morrison, can you try replacing {/foo}
with /{+foo}
?
Alya Abbott (May 10 2023 at 22:35):
Eric Wieser said:
Perhaps Alya Abbott can advise if there's a test instance somewhere that I can try things out on?
I don't have a handy recommendation (though we're working on it! zulip/zulip#19523), but it's not a big deal to create a Zulip Cloud organization just for yourself (https://zulip.com/new/). The somewhat more time-consuming alternative is to set up the Zulip dev environment (https://zulip.readthedocs.io/en/latest/development/overview.html).
Scott Morrison (May 10 2023 at 23:00):
arxiv#gr-qc/9902017, file#data/int/basic
Eric Wieser (May 22 2023 at 17:14):
Can you make the same fix to the port-status
linkifier? {/file}{#fragment}
should be /{file+}{#fragment}
I think.
Mario Carneiro (May 22 2023 at 20:37):
before: port-status#analysis/special_functions/integrals
Mario Carneiro (May 22 2023 at 20:38):
didn't work, says "failed: invalid URL template"
Eric Wieser (May 22 2023 at 20:40):
Whoops, I meant {+file}
not {file+}
Mario Carneiro (May 22 2023 at 20:41):
after: port-status#analysis/special_functions/integrals
Eric Wieser (May 22 2023 at 20:57):
Thanks, that looks good
Notification Bot (Jun 21 2023 at 11:18):
3 messages were moved from this topic to #Zulip meta > Linkifiers by Eric Wieser.
Last updated: Dec 20 2023 at 11:08 UTC