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

show_popup doesn't display remote images #1378

Closed
1 of 3 tasks
Electrofenster opened this issue Sep 19, 2016 · 5 comments
Closed
1 of 3 tasks

show_popup doesn't display remote images #1378

Electrofenster opened this issue Sep 19, 2016 · 5 comments

Comments

@Electrofenster
Copy link

Electrofenster commented Sep 19, 2016

Summary

I tried to display a random image in Sublime Text 3 from a URL but it didn't work, when I convert the image to base64 the img-tag works.
With this Image we test it: https://www.sublimetext.com/images/linux_48.png

Expected behavior

I was expected to see no image

Actual behavior

I got the image to display that i want.

Steps to reproduce

  1. open console in st3
  2. paste this line:
view.show_popup('<img src="https://www.sublimetext.com/images/linux_48.png">')

and we get a empty popup
3. paste this line:

view.show_popup('<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAAwCAYAAACMuVOlAAAJbUlEQVR4Xs2YeXBV1RnAf+e+dcnGSx4JISuyyBLBBZRFipXqjCIoZSY4DIOiHXcKiBRRqkGq1qWAIIvt8EcZB0VaaC3aDA5DUIRSijEQmZomEEIWIUL25eW9d3rfmXunt2+SCQFM+5v55t53k3fml+985zvnhmvICGA1UAJ0Au3AUeDnQCb/B3xkiMnYSEpKkkADsJwrROPqWQXMARzEIIRg1qxZjB8/PlG//zWw8n8lucJ0ohsOHDjAiRMnZBTgZeBm+ojg6hhv1J3sw1jvAk/3ZyYno0C43W66IyMjgxjm9fd0DwKYMGECt956K9nZ2ZhMnDiRFStWMG3aNPUzIQSABJKAwf0p6Zg0aRL79+9XEQgEAMjMzKSoqIjXXnuN7du3K1EppbW8JvenZDAvL4/hw4ezefNmVq58AYCFCx9VC0YIwfr161mzZg12ux0Lkf6UvFRfX09tbS1FB7+g+UI5YwZDx/elfFV8EoCNGzcqWa/Xi4Xz/Sl5/mxVFQUvvUSe6wPuy1jGiX1eFv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cAbqAFgFogM8Ix4v38tCwDOb4B5AbF48jaQBOfwpaspom0DQBQiIjcOl7ZFUF4uPP4Je7aQdC5kowrmHj3gn6WF6cf3oeR9YwCKSCy20nIqG1KUTlaWTRF+xe/D5rBHRIaANagFYzkx5D0msM6PTaGHhDFtlZKQwelcHYMbncmZWJ3x+A6ALr6opuY4jyMhrf/Jitxec4AjQaol1GhAFjGkj1Osn87aOsyM7GF5+IsNmRwU5ETRXsOcSLv/ucQuN77UCrGQIFNkPUa7m6jXAZP+e+Mdxyz03kp/jJsWk4GhtoXvtXHiupoRroNMRMBOAwxnMZ4Xz8du6aOIIFbhd2NGRbGy07D7Pq028osQi2GdEeDRGzRbrNsA5sSNpRIIf4SUhNwHnsLN91RWg35DpjRB2WcZxGOACZ7CUu248vHKHr6xrqLd8LGgXablw76aEh2qyDGmEzQgOw1FzIMr1BI7osWXRawm4ZQ1jGCVvHsETkct8WNUvYrA0IiMSEpHuERU6LlTRFLfex8G9rfcBPH/TAvAAAAABJRU5ErkJggg==">')

and we see the image in our popup

Environment

  • Operating system and version:
    • Windows 10
    • Mac OS ...
    • Linux ...
  • Sublime Text:
    • Build 3114
@keith-hall keith-hall changed the title show_popup displays img tags show_popup doesn't display remote images Sep 19, 2016
@FichteFoll
Copy link
Collaborator

The documentation for minihtml only mentions http:// and not https://. Maybe that is the issue?

@Electrofenster
Copy link
Author

@FichteFoll nope, I got only an empty popup. Build 3124

@liuhaopen
Copy link

I got an empty popup too. Build 3126

@keith-hall
Copy link
Collaborator

Interestingly, this crashes 3128...

Dump Summary
------------
Dump File:	3e3cbcee-0fa2-475a-9d1a-075cdf66107c.dmp : C:\Program Files\Sublime Text 3\3e3cbcee-0fa2-475a-9d1a-075cdf66107c.dmp
Last Write Time:	2017-04-13 09:30:38
Process Name:	sublime_text.exe : C:\Program Files\Sublime Text 3\sublime_text.exe
Process Architecture:	x64
Exception Code:	0xC0000005
Exception Information:	The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
Heap Information:	Not Present

System Information
------------------
OS Version:	6.1.7601
CLR Version(s):	

Modules
-------
Module Name	Module Path	Module Version
-----------	-----------	--------------
sublime_text.exe	C:\Program Files\Sublime Text 3\sublime_text.exe	1.0.0.1
ntdll.dll	C:\Windows\System32\ntdll.dll	6.1.7601.19135
kernel32.dll	C:\Windows\System32\kernel32.dll	6.1.7601.19135
KERNELBASE.dll	C:\Windows\System32\KERNELBASE.dll	6.1.7601.19135
user32.dll	C:\Windows\System32\user32.dll	6.1.7601.19061
gdi32.dll	C:\Windows\System32\gdi32.dll	6.1.7601.19091
lpk.dll	C:\Windows\System32\lpk.dll	6.1.7601.18985
usp10.dll	C:\Windows\System32\usp10.dll	1.626.7601.19054
msvcrt.dll	C:\Windows\System32\msvcrt.dll	7.0.7601.17744
comdlg32.dll	C:\Windows\System32\comdlg32.dll	6.1.7601.17514
shlwapi.dll	C:\Windows\System32\shlwapi.dll	6.1.7601.17514
comctl32.dll	C:\Windows\winsxs\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18837_none_a4d981ff711297b6\comctl32.dll	5.82.7601.18837
advapi32.dll	C:\Windows\System32\advapi32.dll	6.1.7601.19135
sechost.dll	C:\Windows\System32\sechost.dll	6.1.7601.18869
rpcrt4.dll	C:\Windows\System32\rpcrt4.dll	6.1.7601.19135
shell32.dll	C:\Windows\System32\shell32.dll	6.1.7601.19135
ole32.dll	C:\Windows\System32\ole32.dll	6.1.7601.19131
wininet.dll	C:\Windows\System32\wininet.dll	11.0.9600.18205
api-ms-win-downlevel-user32-l1-1-0.dll	C:\Windows\System32\api-ms-win-downlevel-user32-l1-1-0.dll	6.2.9200.16492
api-ms-win-downlevel-shlwapi-l1-1-0.dll	C:\Windows\System32\api-ms-win-downlevel-shlwapi-l1-1-0.dll	6.2.9200.16492
api-ms-win-downlevel-version-l1-1-0.dll	C:\Windows\System32\api-ms-win-downlevel-version-l1-1-0.dll	6.2.9200.16492
version.dll	C:\Windows\System32\version.dll	6.1.7600.16385
api-ms-win-downlevel-normaliz-l1-1-0.dll	C:\Windows\System32\api-ms-win-downlevel-normaliz-l1-1-0.dll	6.2.9200.16492
normaliz.dll	C:\Windows\System32\normaliz.dll	6.1.7600.16385
iertutil.dll	C:\Windows\System32\iertutil.dll	11.0.9600.18212
api-ms-win-downlevel-advapi32-l1-1-0.dll	C:\Windows\System32\api-ms-win-downlevel-advapi32-l1-1-0.dll	6.2.9200.16492
userenv.dll	C:\Windows\System32\userenv.dll	6.1.7601.17514
profapi.dll	C:\Windows\System32\profapi.dll	6.1.7600.16385
apphelp.dll	C:\Windows\System32\apphelp.dll	6.1.7601.19050
AcGenral.dll	C:\Windows\AppPatch\AppPatch64\AcGenral.dll	6.1.7601.19050
sspicli.dll	C:\Windows\System32\sspicli.dll	6.1.7601.19135
sfc.dll	C:\Windows\System32\sfc.dll	6.1.7600.16385
sfc_os.dll	C:\Windows\System32\sfc_os.dll	6.1.7600.16385
dwmapi.dll	C:\Windows\System32\dwmapi.dll	6.1.7601.18917
mpr.dll	C:\Windows\System32\mpr.dll	6.1.7600.16385
imm32.dll	C:\Windows\System32\imm32.dll	6.1.7600.16385
msctf.dll	C:\Windows\System32\msctf.dll	6.1.7601.18731
api-ms-win-core-synch-l1-2-0.DLL	C:\Windows\System32\api-ms-win-core-synch-l1-2-0.DLL	10.0.10586.9
dbghelp.dll	C:\Windows\System32\dbghelp.dll	6.1.7601.17514
CRYPTBASE.dll	C:\Windows\System32\CRYPTBASE.dll	6.1.7601.19135
uxtheme.dll	C:\Windows\System32\uxtheme.dll	6.1.7600.16385
DWrite.dll	C:\Windows\System32\DWrite.dll	6.2.9200.17568
cryptsp.dll	C:\Windows\System32\cryptsp.dll	6.1.7601.18741
rsaenh.dll	C:\Windows\System32\rsaenh.dll	6.1.7600.16385
RpcRtRemote.dll	C:\Windows\System32\RpcRtRemote.dll	6.1.7601.17514
AppHookWIN6064_6C993CE0-151E-4CBB-8F99-BB9E5B52CF5F.dll	C:\Program Files (x86)\DisplayFusion\Hooks\AppHookWIN6064_6C993CE0-151E-4CBB-8F99-BB9E5B52CF5F.dll	8.0.0.16
psapi.dll	C:\Windows\System32\psapi.dll	6.1.7600.16385
winmm.dll	C:\Windows\System32\winmm.dll	6.1.7600.16385
secur32.dll	C:\Windows\System32\secur32.dll	6.1.7601.19135
api-ms-win-downlevel-advapi32-l2-1-0.dll	C:\Windows\System32\api-ms-win-downlevel-advapi32-l2-1-0.dll	6.2.9200.16492
api-ms-win-downlevel-ole32-l1-1-0.dll	C:\Windows\System32\api-ms-win-downlevel-ole32-l1-1-0.dll	6.2.9200.16492
ws2_32.dll	C:\Windows\System32\ws2_32.dll	6.1.7601.17514
nsi.dll	C:\Windows\System32\nsi.dll	6.1.7600.16385
crypt32.dll	C:\Windows\System32\crypt32.dll	6.1.7601.18839
msasn1.dll	C:\Windows\System32\msasn1.dll	6.1.7601.17514
mswsock.dll	C:\Windows\System32\mswsock.dll	6.1.7601.18254
wship6.dll	C:\Windows\System32\wship6.dll	6.1.7600.16385
IPHLPAPI.DLL	C:\Windows\System32\IPHLPAPI.DLL	6.1.7601.17514
winnsi.dll	C:\Windows\System32\winnsi.dll	6.1.7600.16385
urlmon.dll	C:\Windows\System32\urlmon.dll	11.0.9600.18212
api-ms-win-downlevel-shlwapi-l2-1-0.dll	C:\Windows\System32\api-ms-win-downlevel-shlwapi-l2-1-0.dll	6.2.9200.16492
dnsapi.dll	C:\Windows\System32\dnsapi.dll	6.1.7601.17570
oleaut32.dll	C:\Windows\System32\oleaut32.dll	6.1.7601.18679
WSHTCPIP.DLL	C:\Windows\System32\WSHTCPIP.DLL	6.1.7600.16385
FWPUCLNT.DLL	C:\Windows\System32\FWPUCLNT.DLL	6.1.7601.18283
rasadhlp.dll	C:\Windows\System32\rasadhlp.dll	6.1.7600.16385
comctl32.dll	C:\Windows\winsxs\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.18837_none_fa3b1e3d17594757\comctl32.dll	6.10.7601.18837
credssp.dll	C:\Windows\System32\credssp.dll	6.1.7601.19135
schannel.dll	C:\Windows\System32\schannel.dll	6.1.7601.19135
ncrypt.dll	C:\Windows\System32\ncrypt.dll	6.1.7601.19135
bcrypt.dll	C:\Windows\System32\bcrypt.dll	6.1.7600.16385
bcryptprimitives.dll	C:\Windows\System32\bcryptprimitives.dll	6.1.7601.19012
wintrust.dll	C:\Windows\System32\wintrust.dll	6.1.7601.18839
gpapi.dll	C:\Windows\System32\gpapi.dll	6.1.7600.16385
cryptnet.dll	C:\Windows\System32\cryptnet.dll	6.1.7601.18839
Wldap32.dll	C:\Windows\System32\Wldap32.dll	6.1.7601.17514
SensApi.dll	C:\Windows\System32\SensApi.dll	6.1.7600.16385
powrprof.dll	C:\Windows\System32\powrprof.dll	6.1.7600.16385
setupapi.dll	C:\Windows\System32\setupapi.dll	6.1.7601.17514
cfgmgr32.dll	C:\Windows\System32\cfgmgr32.dll	6.1.7601.17514
devobj.dll	C:\Windows\System32\devobj.dll	6.1.7600.16385

@BenjaminSchaaf
Copy link
Member

Build 4184 now loads images from the internet. Note that on Linux this requires libcurl, which may not be installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants