-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Fixed displaying Cesium Ion icon in WebView #8758
Conversation
Thanks for the pull request @vividos!
Reviewers, don't forget to make sure that:
|
@OmarShehata Could you please take a look at this PR and test it with your Cordova test app? Also there is an error from the Prettier tool that I tried to fix, but unfortunately the tool doesn't exactly say what the issue is. Thanks! |
@OmarShehata I finally got it working with Prettier not reporting any issues now. |
@vividos thanks for continuing to investigate this. I can confirm this PR fixes the issue on Android with Cordova and makes the Cesium ion logo correctly appear. @mramato this is the correct approach as far as I'm aware but would love to get a second opinion when you have a chance to take a look. This requires a change in ThirdParty code that we're using to parse URLs which is producing incorrect behavior as I mentioned here: #8669 (comment)
|
@OmarShehata A short comment from me, this PR only changes CreditDisplay.js, where the The other PR from me, #8669, is not necessary to fix the Ion icon, and that PR modifies the third-party code. |
Oh great! My bad for missing that @vividos . This change looks good to me then, and perhaps we can revisit the Congrats on your first merged contribution to CesiumJS Michael! |
When running in a WebView on Android, iOS or UWP
WebView
, the base URL either starts withfile:///
orms-appx-web:///
. When the Credits object for Cesium Ion is created, the<img>
tag contains asrc
attribute with this base URL. The integratedDOMpurify
strips all src tags which doesn't containhttp
orhttps
URLs. This fix changes thesrc
attribute to contain an absolute Url in that case.This PR doesn't need my other try at fixing the Ion icon issue, PR #8669, as it would also work without it.
Fixes #8665.