Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

svgs not rendering in Markdown preview since update #68033

Closed
onewhitey opened this issue Feb 7, 2019 · 8 comments
Closed

svgs not rendering in Markdown preview since update #68033

onewhitey opened this issue Feb 7, 2019 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release verified Verification succeeded webview Webview issues

Comments

@onewhitey
Copy link

onewhitey commented Feb 7, 2019

Issue Type: Bug

Before the update, I am sure I was able to render images as such:

![warning](img/warning.svg) Warning

Viewing the same markdown file today, this renders as a "broken image".

VS Code version: Code 1.31.0 (7c66f58, 2019-02-05T22:32:14.164Z)
OS version: Darwin x64 17.7.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 x 2200)
GPU 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 16.00GB (3.01GB free)
Process Argv -psn_0_1155354
Screen Reader no
VM 0%
Extensions (13)
Extension Author (truncated) Version
bracket-pair-colorizer Coe 1.0.61
dart-code Dar 2.22.3
flutter Dar 2.22.3
gitlens eam 9.5.0
vsc-material-theme Equ 2.6.3
vscode-language-babel mgm 0.0.21
Go ms- 0.9.1
gremlins nho 0.7.0
vscode-docker Pet 0.5.2
vscode-yaml red 0.2.1
vscode-icons rob 8.1.0
code-spell-checker str 1.6.10
markdown-all-in-one yzh 2.0.1

(1 theme extensions excluded)

@vscodebot vscodebot bot added the new release label Feb 7, 2019
@dbaeumer
Copy link
Member

dbaeumer commented Feb 7, 2019

This works for me in Windows:

capture

@dbaeumer
Copy link
Member

dbaeumer commented Feb 7, 2019

Marking as important since this might still be broken under Mac.

@dbaeumer dbaeumer added the important Issue identified as high-priority label Feb 7, 2019
@mjbvz
Copy link
Contributor

mjbvz commented Feb 7, 2019

I also can't repo on mac for bitmap images. @onewhitey Does this only happen for svgs?

@mjbvz mjbvz added info-needed Issue requires more information from poster and removed important Issue identified as high-priority labels Feb 7, 2019
@brychanrobot
Copy link

brychanrobot commented Feb 7, 2019

I'm also seeing this (or not seeing it, rather) on SVGs on linux

@watsonb
Copy link

watsonb commented Feb 7, 2019

I'm on Linux (Ubuntu 18.04) and seeing the "Some content has been disabled in this document" when in Markdown preview mode even though I have explicitly set it to "Disable". This happened since I updated VSCode today:

Version: 1.31.0
Commit: 7c66f58
Date: 2019-02-06T08:51:24.856Z
Electron: 3.1.2
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Linux x64 4.15.0-45-generic

@onewhitey
Copy link
Author

onewhitey commented Feb 7, 2019 via email

@onewhitey
Copy link
Author

@mjbvz I have just tested locally:

image

@mjbvz mjbvz added bug Issue identified by VS Code Team member as probable bug webview Webview issues candidate Issue identified as probable candidate for fixing in the next release and removed info-needed Issue requires more information from poster labels Feb 7, 2019
@mjbvz mjbvz added this to the January Recovery 2019 milestone Feb 7, 2019
@mjbvz mjbvz closed this as completed in 947238c Feb 7, 2019
mjbvz added a commit to mjbvz/vscode that referenced this issue Feb 7, 2019
Fixes microsoft#68033

`allowSvgs` was already set as the default value after the webview was created. Due to an unrelated refactoring, the initial default value did not include `allowSvgs`
mjbvz added a commit to mjbvz/vscode that referenced this issue Feb 7, 2019
Reverts  f98d248 since it caused unexpected side effects. Instead, lazily look up the value for `allowSvgs`. This emulates the behavior before the refactoring that broke svgs in the first place
@mjbvz mjbvz changed the title Markdown images not rendering since update svgs not rendering in Markdown preview since update Feb 7, 2019
mjbvz added a commit that referenced this issue Feb 8, 2019
@Pierresacco
Copy link

Hello,
thanks for solving issue about Mardown preview (disable function not working also for me).
as there is no delivery date for January Recovery 2019 Milestone, could you please tell when release is planned ?

Thanks a lot,

@bpasero bpasero added the verified Verification succeeded label Feb 12, 2019
yhatt added a commit to marp-team/marp-vscode that referenced this issue Feb 13, 2019
VS Code 1.31.0 cannot render SVG in Markdown preview pane. We thought
that was a default behavior
of 1.31 from security reason, but it seems to be just a bug and fixed it
at v1.31.1.

See: microsoft/vscode#68033
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release verified Verification succeeded webview Webview issues
Projects
None yet
Development

No branches or pull requests

7 participants