phcode-dev / phoenix

Phoenix is a modern open-source Code Editor for the web, built for the browser.
https://phcode.io
GNU Affero General Public License v3.0
1.79k stars 124 forks source link

fix: clicking on svg image quick views break open of that svg file #1760

Closed abose closed 4 months ago

abose commented 4 months ago

This was as we always read images for quick view as binary and base64 encoded it. But for SVG files, if we read it as binary once, it gets cached as binary encoding, and will never read as htf8 text if not explicitly specified. since normal flows wont specify it, the file cannot be opened again due to encoding mismatch.

phoenixide commented 4 months ago

Thank You for making this pull request.

sonarcloud[bot] commented 4 months ago

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint