Improve handling of encoding problems when creating link previews (#30929)
This commit is contained in:
parent
05f0d51005
commit
016c1e4e78
5 changed files with 76 additions and 10 deletions
17
spec/fixtures/requests/latin1_posing_as_utf8_broken.txt
vendored
Normal file
17
spec/fixtures/requests/latin1_posing_as_utf8_broken.txt
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
HTTP/1.1 200 OK
|
||||
server: nginx
|
||||
date: Thu, 13 Jun 2024 14:33:13 GMT
|
||||
content-type: text/html; charset=utf-8
|
||||
content-length: 158
|
||||
accept-ranges: bytes
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Tofu á l'orange</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Tofu á l'orange</h2>
|
||||
</body>
|
||||
</html>
|
17
spec/fixtures/requests/latin1_posing_as_utf8_recoverable.txt
vendored
Normal file
17
spec/fixtures/requests/latin1_posing_as_utf8_recoverable.txt
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
HTTP/1.1 200 OK
|
||||
server: nginx
|
||||
date: Thu, 13 Jun 2024 14:33:13 GMT
|
||||
content-type: text/html; charset=utf-8
|
||||
content-length: 158
|
||||
accept-ranges: bytes
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Tofu with orange sauce</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Tofu á l'orange</h2>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue