fix(consistency): align entry fetch content behavior between API and UI #3296
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Have you followed these guidelines?
Problem
I noticed a behavioral inconsistency between the UI and API when working with entries:
When fetching content via the API endpoint, the response was returning raw entry content without:
This inconsistency creates different behaviors depending on whether users interact through the UI or API.
Solution
This PR aligns the API behavior with the UI by:
UpdateEntryTitleAndContent()when fetching content via APImediaproxy.RewriteDocumentWithRelativeProxyURL()to ensure consistent URL handlingThese changes ensure that both the API and UI provide the same functionality and data format when fetching entry content.
Related Behavior
This fix is similar to an issue I noticed previously: when modifying a feed through the web form (e.g., disabling it), the parsing error count and error message are reset. However, this reset doesn't occur when modifying via API. This PR addresses a similar type of UI/API inconsistency.