mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 14:15:11 +08:00
DEV: Extensively use includes()
(#17541)
Also, the change in insert-hyperlink (from `this.linkUrl.indexOf("http") === -1` to `!this.linkUrl.startsWith("http")`) was intentional fix: we don't want to prevent users from looking up topics with http in their titles.
This commit is contained in:
@ -78,7 +78,7 @@ function __getURLNoCDN(url) {
|
||||
return url;
|
||||
}
|
||||
|
||||
if (url.indexOf(__paths.baseUri) !== -1) {
|
||||
if (url.includes(__paths.baseUri)) {
|
||||
return url;
|
||||
}
|
||||
if (url[0] !== "/") {
|
||||
|
Reference in New Issue
Block a user