{"comment":{"url":"https://api.github.com/repos/b3log/solo/comments/17347533","html_url":"https://github.com/b3log/solo/commit/7bfb906754105877f21d2e416d6d75bd451b41fb#commitcomment-17347533","id":17347533,"user":{"login":"AnnPeter","id":7344217,"avatar_url":"https://avatars.githubusercontent.com/u/7344217?v=3","gravatar_id":"","url":"https://api.github.com/users/AnnPeter","html_url":"https://github.com/AnnPeter","followers_url":"https://api.github.com/users/AnnPeter/followers","following_url":"https://api.github.com/users/AnnPeter/following{/other_user}","gists_url":"https://api.github.com/users/AnnPeter/gists{/gist_id}","starred_url":"https://api.github.com/users/AnnPeter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnnPeter/subscriptions","organizations_url":"https://api.github.com/users/AnnPeter/orgs","repos_url":"https://api.github.com/users/AnnPeter/repos","events_url":"https://api.github.com/users/AnnPeter/events{/privacy}","received_events_url":"https://api.github.com/users/AnnPeter/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"7bfb906754105877f21d2e416d6d75bd451b41fb","created_at":"2016-05-04T05:40:28Z","updated_at":"2016-05-04T05:40:28Z","body":"我们的博客总是会经常提交代码块的，在昨天提交的时候我发现博客中代码块的行高特别高，pre中在进行html格我把我的css样式翻了个遍，没有找到问题所在，后来经过各种手段确认不是css问题，而是在pre块中存在换行。\r\n\r\n以下是一个简短的调试视频。\r\n![调试视频][1]\r\n\r\n最终确定我还是拿出了神器Wireshark才最终确定，下面是关于这段代码在Wireshark中获取到的截图。\r\n![此处输入图片的描述][2]\r\n\r\n为了确认不是我输入的数据有问题，我还专程跑到数据库里看了一下，确认我没有输入换行。\r\n\r\n最后确认系统中在进行html格式化的时候出现了问题。\r\n\r\n\r\n找到问题就行了，Google到一下解决办法。\r\n\r\n```java\r\n//修改前的代码\r\nDocument doc = Jsoup.parse(content);\r\n\r\n//修改后的代码\r\nDocument doc = Jsoup.parse(content, StringUtils.EMPTY, Parser.htmlParser());\r\ndoc.outputSettings().prettyPrint(false);\r\n```\r\n\r\n实际上就是让Jsoup在解析html的时候不进行美化直接输出。\r\n\r\n\r\n\r\n\r\n  [1]: http://7xtmt1.com1.z0.glb.clouddn.com/b3log%EF%BC%8C%E8%BF%99%E6%AC%A1%E6%88%91%E5%BD%BB%E5%BA%95%E6%87%B5%E9%80%BC%E4%BA%86%E3%80%82%E3%80%82%E3%80%82.mp4\r\n  [2]: http://7xtmt1.com1.z0.glb.clouddn.com/F5590079-E366-487F-B419-E0F1A67CF0BA.png"}}