mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-25 07:36:37 +00:00
Fix links to users and communities not including query in hyperlink (#2368)
Co-authored-by: SleeplessOne1917 <insomnia-void@protonmail.com>
This commit is contained in:
parent
5eb97edf09
commit
72b3d6b828
|
@ -1 +1 @@
|
||||||
Subproject commit 91563f222284e19def549ac5247039b398c78931
|
Subproject commit 6c03b403c79bc5a893527d1fe217690db774a7ef
|
|
@ -33,6 +33,8 @@ export const authCookieName = "jwt";
|
||||||
// page on route "/communities"
|
// page on route "/communities"
|
||||||
export const communityLimit = 50;
|
export const communityLimit = 50;
|
||||||
|
|
||||||
|
const queryPairRegex = "[a-zA-Zd_-]+=[a-zA-Zd+-_]+";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Accepted formats:
|
* Accepted formats:
|
||||||
* !community@server.com
|
* !community@server.com
|
||||||
|
@ -40,7 +42,9 @@ export const communityLimit = 50;
|
||||||
* /m/community@server.com
|
* /m/community@server.com
|
||||||
* /u/username@server.com
|
* /u/username@server.com
|
||||||
*/
|
*/
|
||||||
export const instanceLinkRegex =
|
export const instanceLinkRegex = new RegExp(
|
||||||
/(\/[cmu]\/|!)[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g;
|
`(/[cmu]/|!)[a-zA-Z\\d._%+-]+@[a-zA-Z\\d.-]+\\.[a-zA-Z]{2,}(?:/?\\?${queryPairRegex}(?:&${queryPairRegex})*)?`,
|
||||||
|
"g",
|
||||||
|
);
|
||||||
|
|
||||||
export const testHost = "0.0.0.0:8536";
|
export const testHost = "0.0.0.0:8536";
|
||||||
|
|
Loading…
Reference in a new issue