mirror of
https://github.com/discourse/discourse.git
synced 2025-01-20 10:43:15 +08:00
03cd5baed9
@danielwaterworth suggested taking a look at this when reviewing a plugin using this API. When declaring a new nav item using `addNavigationBarItem` and including the `href` attribute, we don't currently process that URL to be subfolder compatible. Nav bar items coming in via the API are considered `ExtraNavItem` and the `href` value is passed straight through to the `buildItems` method, vs using the computed href method. This PR adds a simple `getURL` call on that href value to ensure it's subfolder-safe. I also accounted for the `customHref` function in the API to make those URLs subfolder safe as well. <!-- NOTE: All pull requests should have tests (rspec in Ruby, qunit in Javascript). If your code does not include test coverage, please include an explanation of why it was omitted. --> |
||
---|---|---|
.. | ||
images | ||
javascripts | ||
stylesheets |