Ghost: script url path issue in rss feed

Created on 26 Oct 2018  路  6Comments  路  Source: TryGhost/Ghost

Issue Summary

when using a script tag <script src="/some/javascript.js"></script> on a blog with config__url https://example.com/blog/ in the rss feed the script is pointing to <script src="https://example.com/blog/some/javascript.js"></script> instead of <script src="https://example.com/some/javascript.js"></script> while working just fine in the regular article view.

Technical details:

  • Ghost Version: 2.3.0
  • Node Version: 10.8.0
  • Browser/OS: Debian Linux with kernel 4.17.8
  • Database: SLQite
api bug server / core stale

All 6 comments

@gargol Could you please re-triage this issue? Thanks 馃憤

Confirming this bug. After some investigation came to conclusion that we are not using html transformation in the same way in rss and api.

The main difference is that in rss we are not passing in assetsOnly: true flag, which causes the script tag to transform it's src attribute. Since all urls are meant to use absolute path in Ghost, probably fix would be removing assetOnly flag in output/utils/url.js. What do you think @kirrg001 ?

The assetsOnly flag was invented to skip making resource urls absolute. If we would remove assetsOnly from the url output seriaizer, then we would automatically transform resource urls to absolute, which we don't want. I am not 100% sure right now how the assetsOnly flag is related to this bug report, but i have not investigated.

I'd suggest to add this bug to our backlog for now and investigate further if we work on it? 馃檭

After some investigation came to conclusion that we are not using html transformation in the same way in rss and api.

@gargol Links to master code base is not helpful long-term when sharing code, because it changes every day.

@kirrg001 thanks for spotting ;) updates to permalinks

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fueko picture fueko  路  3Comments

mattferderer picture mattferderer  路  4Comments

albizures picture albizures  路  3Comments

marcuspoehls picture marcuspoehls  路  4Comments

jliikala picture jliikala  路  3Comments