使用JSoup包含最后一个版本1.7.2,有一个错误解析带有未关闭标记的无效 HTML .
例:
String tmp = "<a href='www.google.com'>Link<p>Error link</a>";
Jsoup.parse(tmp);
Run Code Online (Sandbox Code Playgroud)
生成的文档是:
<html>
<head></head>
<body>
<a href="www.google.com">Link</a>
<p><a>Error link</a></p>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
浏览器会生成以下内容:
<html>
<head></head>
<body>
<a href="www.google.com">Link</a>
<p><a href="www.google.com">Error link</a></p>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
Jsoup应该作为浏览器或源代码.
有什么解决方案吗?查看API我没有找到任何东西.
我正在使用vertx3.我试过版本3.0.0 - 3.1.0 - 3.2.0-SNAPSHOT,并且所有这些都在发生.
为了简化问题,我创建了2个简单的Verticle.第一个充当消息的消费者,第二个通过事件总线发送消息.
问题是eventBus看起来不起作用,我在群集中运行时有超时.
我无法理解为什么看起来第二个节点加入集群等等.
我在这里添加代码.
public class FirstVerticle extends AbstractVerticle {
private final Logger log = LoggerFactory.getLogger(getClass());
@Override
public void start() {
getVertx().eventBus().consumer("test-service", message -> {
log.info(String.format("test-Service receive: %s", message));
message.reply("ok");
}).completionHandler(event -> {
if(event.succeeded()) log.info("complete handler");
else log.info("failed");
});
log.info("Done initializing");
}
Run Code Online (Sandbox Code Playgroud)
}
public class SecondVerticle extends AbstractVerticle {
private final Logger log = LoggerFactory.getLogger(getClass());
@Override
public void start() {
log.info("Done initializing test");
getVertx().setPeriodic(2000L, id -> {
log.info("sending message test");
getVertx().eventBus().send("test-service", "hi", response -> { …Run Code Online (Sandbox Code Playgroud)