mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 18:31:57 +03:00
32f3f9d2c3
refs https://github.com/TryGhost/Ghost/issues/10477 The unsaved changes modal is displaying even when the post has been saved if images have been uploaded because the server is transforming absolute image urls to relative during input of the `mobiledoc` field but not transforming them back to absolute during output. The editor then thinks it's out of sync and shows the warning when trying to leave. - `@tryghost/url-utils` has been updated with new methods for transforming URLs in mobiledoc content - moves absolute->relative transformation from the API input serializers into the Post model - transforms URLs in more fields for a more comprehensive transformation and fewer issues when re-configuring a site's domain - previously there could be problems with internal links between posts not being transformed so you could change the url config to newdomain.com but links in post content would still be pointing to olddomain.com - updates the API post output serializers to transform all modified fields - drops the `?absolute_urls=true` param switch from the `canary` API post output serializer so that all URLs are output as absolute - we're transforming more urls to relative when saving so this is necessary to ensure the unsaved changes modal is not triggered - the query param isn't documented and will disappear in v3 |
||
---|---|---|
.. | ||
input | ||
output | ||
index.js |