Comments (8)
我在MAC 端测试没问题,在安卓端测试也没问题,在IOS 16.5.1 微信8.0.39端测试就不行
from modern-screenshot.
修改以下代码就没问题了:
function de(e) {
const t = new XMLSerializer().serializeToString(e)
.replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\uFFFE\uFFFF]/ug, ""); //方法一:去掉\uD800-\uDFFF
//.replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE\uFFFF]/ug, ""); //方法二:注释掉全部
return data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}
;
}
from modern-screenshot.
这段代码是过滤掉 xml 中 null 控制符的,估计是误伤两个 unicode 组成的 emoji 了,可以提供下异常的 emoji
from modern-screenshot.
😊😘 我随便测试了几个emoji都有问题
from modern-screenshot.
https://modern-screenshot.vercel.app/
这两个 emoji 我浏览器是没问题,看是环境问题还是其他 emoji ,最好是把整段有问题的提供下
from modern-screenshot.
v4.4.27 支持了只启用部分特性
domToPng({
features: {
// 不启用移除控制符
removeControlCharacter: false,
}
})
from modern-screenshot.
I have the same issue - iOS only - no issue on desktop Safari
Using domToBlob in my use case.
Setting removeControlCharacter
to true/false makes no difference to the error
from modern-screenshot.
Using the vercel demo app you can reproduce:
Running iPhone 15 simulator on iOS 17.2
from modern-screenshot.
Related Issues (20)
- having issue with background clip in textarea
- backdrop-filter not working HOT 1
- 可否实现滚动截图,求大佬给个demo
- CORS problems HOT 3
- OPPO自带浏览器SecurityError
- dom元素很长时,domToPng会出现0kb HOT 1
- 设置style选项时报错 HOT 1
- Bug deleting primary colors such as #000000(black) HOT 1
- Capacitor Support HOT 1
- Add option to selectively include style properties when cloning element HOT 1
- How to take full page screenshot using this library?
- Cannot use any function in Next js [Internal server error/Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.]
- letterspacing is ignored or produces unpredictable results
- no-cors mode errors despite 200 response HOT 1
- Failed to load webfont for pseudo-elements HOT 1
- Error when rendering emoji on Safari HOT 1
- (Not an issue) - Just a compliment to the author
- Bug: an exception with SVG, and noscript element not removed, and other exceptions
- CORS problem with images from AWS S3
- Struggling to download complex image automatically with link click method
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modern-screenshot.