Files
mostlymatter/app
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-04-27 12:49:45 -07:00
2018-03-07 12:36:40 -06:00
2017-10-30 11:57:24 -05: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-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
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-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
2018-04-27 12:49:45 -07:00
2018-03-29 10:04:54 -04:00
2018-04-27 12:49:45 -07: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-04-27 12:49:45 -07:00
2018-01-17 13:38:37 -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
2018-04-27 12:49:45 -07: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-09-06 23:11:59 -07:00
2018-04-27 12:49:45 -07:00
2018-04-27 12:49:45 -07:00
2018-03-22 09:53:43 -04: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-11-22 10:15:03 -05:00
2018-04-27 12:49:45 -07:00