requarks / wiki

Wiki.js | A modern and powerful wiki app built on Node.js
https://js.wiki
GNU Affero General Public License v3.0
24.87k stars 2.74k forks source link

svg assets are not rendered in pages using visual editor #1923

Closed regevbr closed 4 years ago

regevbr commented 4 years ago

Describe the bug When uploading an svg asset, it is not rendered on pages renderd using the visual editor

To Reproduce Steps to reproduce the behavior:

  1. Edit a page (using visual editor)
  2. Insert an image
  3. Upload an svg asset
  4. The svg is not renderd in the preview
  5. Save the page
  6. The svg is not rendered in the page

Expected behavior Properly render svg assets

Host Info (please complete the following information):

Additional context It seems that the reason being that the svg is refernced in the page in an img tag which doesn't work. We need to either inline the svg, or use:

<object data="algerie.svg" type="image/svg+xml"></object>
regevbr commented 4 years ago

Never mind, it was just a fault svg apperantly