discourse/app
Justin DiRose 03cd5baed9
FIX: Make addNavigationBarItem subfolder compatible (#11101)
@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. -->
2020-11-02 11:30:23 -06:00
..
assets FIX: Make addNavigationBarItem subfolder compatible (#11101) 2020-11-02 11:30:23 -06:00
controllers Revert "DEV: enable cors to all cdn get requests from workbox. (#10684)" (#11076) 2020-10-30 16:05:35 +11:00
helpers Replace base_uri with base_path (#10879) 2020-10-09 12:51:24 +01:00
jobs FEATURE: new setting to create a linked topic on autoclosing mega topics (#11001) 2020-11-02 12:18:48 +05:30
mailers FIX: Ensure group SMTP and message builder always uses from address for Reply-To when IMAP is enabled (#11037) 2020-10-28 07:01:58 +10:00
models FEATURE: new setting to create a linked topic on autoclosing mega topics (#11001) 2020-11-02 12:18:48 +05:30
serializers FIX: Only include last_posted_at if there's a topic_user object. (#11011) 2020-10-23 11:31:59 -03:00
services REFACTOR: Removes double check of site setting in badge granter 2020-10-05 19:59:57 +02:00
views Revert "FEATURE: Upgrade analytics.js to gtag.js (#10893)" (#10910) 2020-10-13 12:20:41 -05:00