- Update the TOPIC_URL_REGEXP in `lib/url` so that `navigatedToPost` doesn't attempt to handle slug-less URLs. Slugs must contain at least one non-numeric character, so we can use that fact to make the regex more specific. We want slug-less URLs to be routed as a normal Ember transition, so that `topic-by-slug-or-id` can catch them and re-write the URL to include the slug.
- Update the `topic-by-slug-or-id` afterModel to ensure that the Ember router is used to handle the redirect, rather than DiscourseURL. This guarantees that it will function as a redirect (DiscourseURL.routeTo sometimes bypasses the router). This solves the history problem which was worked-around in
|
||
|---|---|---|
| .. | ||
| adapters | ||
| components | ||
| controllers | ||
| helpers | ||
| initializers | ||
| lib | ||
| mixins | ||
| models | ||
| pre-initializers | ||
| raw-views | ||
| routes | ||
| services | ||
| styles | ||
| templates | ||
| widgets | ||
| app.js | ||
| index.html | ||
| mapping-router.js | ||