From the review of #341.
stripDraftMediaUrls (composer-core.js) removes every occurrence of each attachment URL from the saved text. That is right for the old-format migration (a URL the old composer wrote in as its own line) but wrong for prose a user deliberately authored: "mirror at https://x/a.png if the first dies" silently loses the URL on the next restore if that image is also attached.
Fix shape: strip only occurrences that sit on a line boundary — alone on the line, or glued to either end — which is exactly the rule the paste-offer already uses (urlOnBoundary, same file). Interior mentions stay. Vectors: lone line stripped, glued-end stripped, mid-sentence kept, and a URL that appears both as a leftover line and inside prose keeps only the prose copy.
From the review of #341.
stripDraftMediaUrls(composer-core.js) removes every occurrence of each attachment URL from the saved text. That is right for the old-format migration (a URL the old composer wrote in as its own line) but wrong for prose a user deliberately authored: "mirror at https://x/a.png if the first dies" silently loses the URL on the next restore if that image is also attached.Fix shape: strip only occurrences that sit on a line boundary — alone on the line, or glued to either end — which is exactly the rule the paste-offer already uses (
urlOnBoundary, same file). Interior mentions stay. Vectors: lone line stripped, glued-end stripped, mid-sentence kept, and a URL that appears both as a leftover line and inside prose keeps only the prose copy.