The bug was mentioned on [meta](https://meta.discourse.org/t/two-bugs-with-usernames-starting-with-subfolder-name/169505) When discourse is installed on `/subfolder` and username is containing subfolder name like for example `subfolderadmin` - user URLs were incorrect. Instead of having `/subfolder/u/subfolderadmin/summary/` we were leading to `/subfolder/uadmin/summary`. The reason for that was incorrect check in `getUrl` helper: ```javascript const found = url.indexOf(baseUri); if (found >= 0 && found < 3) { return url; } return baseUri + url; ``` baseUri is `/subfolder`, url is `/u/subfolderadmin` and indexOf returned position which in the end returned incorrect URL. I think that we should check if the URL starts with baseUri and not if contains baseUri. |
||
|---|---|---|
| .. | ||
| allow-lister-test.js | ||
| bookmark-test.js | ||
| break-string-test.js | ||
| category-badge-test.js | ||
| click-track-edit-history-test.js | ||
| click-track-profile-page-test.js | ||
| click-track-test.js | ||
| computed-test.js | ||
| emoji-store-test.js | ||
| emoji-test.js | ||
| formatter-test.js | ||
| get-url-test.js | ||
| highlight-search-test.js | ||
| i18n-test.js | ||
| icon-library-test.js | ||
| key-value-store-test.js | ||
| keyboard-shortcuts-test.js | ||
| link-lookup-test.js | ||
| link-mentions-test.js | ||
| load-script-test.js | ||
| oneboxer-test.js | ||
| parse-bbcode-tag-test.js | ||
| preload-store-test.js | ||
| pretty-text-test.js | ||
| sanitizer-test.js | ||
| screen-track-test.js | ||
| search-test.js | ||
| sharing-test.js | ||
| text-direction-test.js | ||
| to-markdown-test.js | ||
| upload-short-url-test.js | ||
| uploads-test.js | ||
| url-test.js | ||
| user-search-test.js | ||
| utilities-test.js | ||