Hyeseong Kim
e73f1d7314
MM-9072/MM-10185 Force-convert the encoding of OpenGraph metadata to UTF-8 (#8631)
* Force-convert non-UTF8 HTML to UTF8 before opengraph processing
* Split the force-encoding function
* Add benchmark Test for the forceHTMLEncodingToUTF8()
```
Running tool: /home/comet/go-v1.9.2/bin/go test -benchmem -run=^$ github.com/mattermost/mattermost-server/app -bench ^BenchmarkForceHTMLEncodingToUTF8$
[03:32:58 KST 2018/04/21] [INFO] (github.com/mattermost/mattermost-server/app.TestMain:28) -test.run used, not creating temporary containers
goos: linux
goarch: amd64
pkg: github.com/mattermost/mattermost-server/app
BenchmarkForceHTMLEncodingToUTF8/with_converting-4 100000 11201 ns/op 18704 B/op 32 allocs/op
BenchmarkForceHTMLEncodingToUTF8/without_converting-4 300000 3931 ns/op 4632 B/op 13 allocs/op
PASS
ok github.com/mattermost/mattermost-server/app 2.703s
Success: Benchmarks passed.
```
* Remove an unnecessary constraint
* Add pre-check if content-type header is already utf-8
* Move the checking for utf-8 into forceHTMLEncodingToUTF8() for testing
* Revert df3f347213faa0d023c26d201fa6531f46391086..HEAD, without Gopkg.lock
2018-04-30 09:54:11 -07:00
..
2018-04-27 12:49:45 -07:00
2018-04-27 12:49:45 -07:00
2018-04-27 12:49:45 -07:00
2018-04-27 12:49:45 -07:00
2018-04-27 12:49:45 -07:00
2018-04-27 12:49:45 -07:00
2017-09-06 23:11:59 -07:00
2018-01-31 09:49:15 -08:00
2018-02-06 17:25:49 -06:00
2018-03-29 10:04:54 -04:00
2018-04-27 12:49:45 -07:00
2018-01-08 13:13:24 -05:00
2018-03-07 12:36:40 -06:00
2017-10-30 11:57:24 -05:00
2018-03-21 18:27:14 +00:00
2018-04-12 15:02:36 -04:00
2018-04-27 12:49:45 -07:00
2017-10-30 11:57:24 -05:00
2018-04-27 12:49:45 -07:00
2017-10-18 15:36:43 -07:00
2018-04-06 17:08:57 -04:00
2018-04-27 12:49:45 -07:00
2017-10-04 13:09:41 -07:00
2018-04-27 12:49:45 -07:00
2017-09-28 00:52:34 +08:00
2017-11-09 14:46:20 -06:00
2017-11-21 11:08:32 -08:00
2017-11-09 14:46:20 -06:00
2017-11-09 14:46:20 -06:00
2017-11-21 11:08:32 -08:00
2017-11-09 14:46:20 -06:00
2017-09-14 13:01:44 -04:00
2017-11-09 14:46:20 -06:00
2017-11-09 14:46:20 -06:00
2018-04-27 12:49:45 -07:00
2018-03-02 16:49:18 +00:00
2017-11-14 17:27:14 -05:00
2018-04-27 12:49:45 -07:00
2017-11-09 14:46:20 -06:00
2018-04-27 12:49:45 -07:00
2018-04-16 14:23:58 +02:00
2018-04-27 12:49:45 -07:00
2017-11-09 14:46:20 -06:00
2017-11-09 14:46:20 -06:00
2018-04-27 12:49:45 -07:00
2017-11-09 14:46:20 -06:00
2017-11-09 14:46:20 -06:00
2017-11-01 14:15:31 -04:00
2018-04-27 12:49:45 -07:00
2018-04-27 12:49:45 -07:00
2018-04-12 09:12:59 -04:00
2017-11-09 14:46:20 -06:00
2017-11-09 14:46:20 -06:00
2017-11-09 14:46:20 -06:00
2018-04-27 12:49:45 -07:00
2017-11-09 14:46:20 -06:00
2017-11-09 14:46:20 -06:00
2017-11-09 14:46:20 -06:00
2017-11-09 14:46:20 -06:00
2017-10-09 10:30:48 -07:00
2018-04-27 12:49:45 -07:00
2018-02-06 17:25:49 -06:00
2018-03-26 17:55:35 -04:00
2018-04-27 12:49:45 -07:00
2017-10-02 12:43:21 +01:00
2018-03-29 10:04:54 -04:00
2018-04-30 10:37:15 -04:00
2017-10-18 15:36:43 -07:00
2017-10-30 11:57:24 -05:00
2018-04-27 12:49:45 -07:00
2018-04-27 12:49:45 -07:00
2018-04-27 12:49:45 -07:00
2017-11-16 16:04:27 -05:00
2018-04-27 12:49:45 -07:00
2018-03-29 10:04:54 -04:00
2018-04-27 12:49:45 -07:00
2017-10-04 13:09:41 -07:00
2017-09-29 10:29:29 +01:00
2018-04-27 12:49:45 -07:00
2018-02-12 16:01:02 -05:00
2018-04-27 12:49:45 -07:00
2018-03-12 10:21:20 -04:00
2018-04-19 11:21:33 -03:00
2018-04-27 12:49:45 -07:00
2018-01-17 13:38:37 -05:00
2018-04-27 12:49:45 -07:00
2018-01-11 13:23:41 -08:00
2018-04-18 10:18:07 +01:00
2018-04-06 17:08:57 -04:00
2018-03-13 10:32:24 -04:00
2018-04-27 12:49:45 -07:00
2018-04-30 09:54:11 -07:00
2018-04-30 09:54:11 -07:00
2018-03-02 16:49:18 +00:00
2018-02-05 23:27:34 -06:00
2018-04-27 12:49:45 -07:00
2018-01-22 15:32:50 -06:00
2018-04-27 12:49:45 -07:00
2018-03-21 18:27:14 +00:00
2018-04-27 12:49:45 -07:00
2018-03-09 07:48:30 -05:00
2018-04-27 12:49:45 -07:00
2018-02-12 16:01:02 -05:00
2018-04-27 12:49:45 -07:00
2017-11-17 11:17:59 -05:00
2017-11-17 11:17:59 -05:00
2017-09-06 23:11:59 -07:00
2018-04-27 12:49:45 -07:00
2018-03-09 07:48:30 -05:00
2018-04-27 12:49:45 -07:00
2018-04-18 13:46:10 -07:00
2018-04-30 17:57:57 +08:00
2018-03-22 09:53:43 -04:00
2018-04-18 13:46:10 -07:00
2018-04-27 12:49:45 -07:00
2018-04-20 08:44:18 -04:00
2018-04-27 12:49:45 -07:00
2017-11-13 11:59:51 -08:00
2018-04-27 12:49:45 -07:00
2018-03-26 17:55:35 -04:00
2018-04-27 12:49:45 -07:00
2017-11-22 10:15:03 -05:00
2018-04-27 12:49:45 -07:00