- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在构建一个从 Wordpress 站点解析 XML 的应用程序。由于它在 Wordpress 上运行,所以使用的 HTML 实际上作为文本的一部分存储在数据库中,当我尝试删除 HTML 时,会出现此符号:

不确定它是否会在此处正确显示,但它是虚线框中的一个小 OBJ 符号,每当 HTML 解析器尝试解析图像时,它就会出现在文本中。基本上,我想要的是检测何时发生这种情况并将其删除,但我无法在代码中检测到它。
我开始使用的 HTML 代码如下所示:
05-21 11:26:05.402: I/System.out(6546):
<a id="dd_start"></a><p><strong><a href="http://movieboozer.com/wp-content/uploads/2012/05/the-avengers-poster.jpg" onclick="return TrackClick('http%3A%2F%2Fmovieboozer.com%2Fwp-content%2Fuploads%2F2012%2F05%2Fthe-avengers-poster.jpg','the-avengers-poster')"><img class="alignleft wp-image-22470" style="margin-left: 10px; margin-right: 10px;" title="the-avengers-poster" src="http://movieboozer.com/wp-content/uploads/2012/05/the-avengers-poster.jpg" onclick="return TrackClick('http%3A%2F%2Fmovieboozer.com%2Fwp-content%2Fuploads%2F2012%2F05%2Fthe-avengers-poster.jpg','the-avengers-poster')" alt="" width="208" height="308" /></a>By: <a href="http://neauxreelidea.blogspot.com/" onclick="return TrackClick('http%3A%2F%2Fneauxreelidea.blogspot.com%2F','Bill+Arceneaux')">Bill Arceneaux</a> </strong><strong></strong><strong>(<a href="#verdict">A Toast</a>)<br /></strong><strong>Note: There is a rating embedded within this post, please visit this post to rate it. </strong></p><p>I used to collect comic books. Yes, I admit it. I got swept up in the fantasy of characters with unique abilities beyond those of normal people, fighting over exaggerated villains in an effort to save their hometown, and in some cases, the world. I mostly focused on the Superman comics – during the period of time when he became pure energy (I was probably one of the few that liked that story arc) – but I certainly hadn’t chosen a side in the DC vs. Marvel fight. Why pigeonhole yourself to just one brand?<span id="more-22462"></span></p><p><a href="http://movieboozer.com/wp-content/uploads/2012/05/200px-Action_Comics_1.jpg" onclick="return TrackClick('http%3A%2F%2Fmovieboozer.com%2Fwp-content%2Fuploads%2F2012%2F05%2F200px-Action_Comics_1.jpg','200px-Action_Comics_1')"><img class="aligncenter size-full wp-image-22467" title="200px-Action_Comics_1" src="http://movieboozer.com/wp-content/uploads/2012/05/200px-Action_Comics_1.jpg" onclick="return TrackClick('http%3A%2F%2Fmovieboozer.com%2Fwp-content%2Fuploads%2F2012%2F05%2F200px-Action_Comics_1.jpg','200px-Action_Comics_1')" alt="" width="200" height="277" /></a></p><p style="text-align: center;">Never got my hands on that issue.</p><p>My collection eventually stopped – only a little more than a handful of issues remain. Was this just a passing fancy? I think, personally, I just yearned for something more; something to give the pages a new life in my eyes, without insulting my devotion to the mythology. In the last decade, we’ve seen movies that range from bastardized toy commercials to unique creative interpretations. But, have we seen the best that comic book movies can be?</p><p>If we haven’t yet, <em>The Avengers</em> might just be it. The culmination of millions of dollars in production budgets and years of origin stories, this story has HIGH expectations:</p><p>After finding his way out of a cosmic abyss (as seen in <em>Thor</em>), Loki (Tom Hiddleston) makes a play and captures the Tesseract (as seen in <em>Captain America: The First Avenger</em>) – a cube of energy that could prove dangerous if in the wrong hands – from S.H.I.E.L.D. (as seen in all previous Marvel Cinematic Universe films). Nick Fury (Samuel L. Jackson) is forced to restart the Avengers Initiative – a program to bring together Earth’s mightiest heroes – in a last ditch effort to get the cube back and stop Loki from leading an alien army.</p><p>Of course, this means that Fury must bring together a group of people who probably shouldn’t be in the same room together; Iron Man (Robert Downey Jr.), CaptainAmerica(Chris Evans), Dr. Bruce Banner AKA The Hulk (Mark Ruffalo), Thor (Chris Hemsworth), Black Widow (Scarlett Johansson) and Hawkeye (Jeremy Renner). Can these heroes put their difference aside and conquer their own inner problems in time to save the world?</p><p><strong>A Toast</strong></p><p>Have you ever had an awesome-gasm? … Did I just invent a new word to describe a movie?</p><p><a href="http://movieboozer.com/wp-content/uploads/2012/05/hulk.jpg" onclick="r.......
这就是之后的样子:
05-21 11:26:05.585: I/System.out(6546): : Bill Arceneaux (A Toast)
05-21 11:26:05.585: I/System.out(6546): Note: There is a rating embedded within this post, please visit this post to rate it.
05-21 11:26:05.585: I/System.out(6546): I used to collect comic books. Yes, I admit it. I got swept up in the fantasy of characters with unique abilities beyond those of normal people, fighting over exaggerated villains in an effort to save their hometown, and in some cases, the world. I mostly focused on the Superman comics – during the period of time when he became pure energy (I was probably one of the few that liked that story arc) – but I certainly hadn’t chosen a side in the DC vs. Marvel fight. Why pigeonhole yourself to just one brand?
05-21 11:26:05.585: I/System.out(6546): 
05-21 11:26:05.585: I/System.out(6546): Never got my hands on that issue.
05-21 11:26:05.585: I/System.out(6546): My collection eventually stopped – only a little more than a handful of issues remain. Was this just a passing fancy? I think, personally, I just yearned for something more; something to give the pages a new life in my eyes, without insulting my devotion to the mythology. In the last decade, we’ve seen movies that range from bastardized toy commercials to unique creative interpretations. But, have we seen the best that comic book movies can be?
05-21 11:26:05.585: I/System.out(6546): If we haven’t yet, The Avengers might just be it. The culmination of millions of dollars in production budgets and years of origin stories, this story has HIGH expectations:
05-21 11:26:05.589: I/System.out(6546): After finding his way out of a cosmic abyss (as seen in Thor), Loki (Tom Hiddleston) makes a play and captures the Tesseract (as seen in Captain America: The First Avenger) – a cube of energy that could prove dangerous if in the wrong hands – from S.H.I.E.L.D. (as seen in all previous Marvel Cinematic Universe films). Nick Fury (Samuel L. Jackson) is forced to restart the Avengers Initiative – a program to bring together Earth’s mightiest heroes – in a last ditch effort to get the cube back and stop Loki from leading an alien army.
05-21 11:26:05.589: I/System.out(6546): Of course, this means that Fury must bring together a group of people who probably shouldn’t be in the same room together; Iron Man (Robert Downey Jr.), CaptainAmerica(Chris Evans), Dr. Bruce Banner AKA The Hulk (Mark Ruffalo), Thor (Chris Hemsworth), Black Widow (Scarlett Johansson) and Hawkeye (Jeremy Renner). Can these heroes put their difference aside and conquer their own inner problems in time to save the world?
05-21 11:26:05.589: I/System.out(6546): A Toast
05-21 11:26:05.589: I/System.out(6546): Have you ever had an awesome-gasm? … Did I just invent a new word to describe a movie?
05-21 11:26:05.589: I/System.out(6546): 
05-21 11:26:05.589: I/System.out(6546): HULK SMASH EXPECTATIONS!
05-21 11:26:05.589: I/System.out(6546): With a cast of characters and actors this big, you would think things might get a bit muddled. But, with lots of clever photography, editing and dialogue, everything works out. Each hero – even Hawkeye and Black Widow – gets time to shine. And I don’t just mean moments where they look pretty and badass; each hero has personality and conflict. We actually get a little bit of depth here! It could have easily been a dumb action film, but instead chose to be a really good comic book.
05-21 11:26:05.589: I/System.out(6546): Marvel could’ve easily picked a team of hack writers and a yes man director to helm this project, expecting to make their money back on brand recognition alone. Instead, they picked a fan friendly writer/director who understands how the audience feels about these characters, and really delivered something special. Sure, the depth I described doesn’t go into superhero psychology levels, but it’s exactly where we need it to be. This really is just about perfect.
05-21 11:26:05.589: I/System.out(6546): Create a Drink
05-21 11:26:05.589: I/System.out(6546): At one point in the film, Loki is offered a drink. He turns it down, but that doesn’t mean you shouldn’t. Just for fun, come up with your own Loki inspired beverage (but be safe about it). Some people at the midnight screening I attended were dressed as their favorite characters; why not pay homage to them in liquid courage form?
05-21 11:26:05.589: I/System.out(6546): Verdict
05-21 11:26:05.589: I/System.out(6546): 
05-21 11:26:05.589: I/System.out(6546): Comic book movies rarely get any better than this. This isn’t to knock the other superhero flicks coming out this year (they’ll probably be great for different reasons), but the bar has been reset. Maybe the genre should be split into comic book, graphic novel and one off categories, in an effort to better tell the good from the bad? All I know for sure is, I feel like dusting off my old Action Comics issues.
我有一种感觉,这个问题可能归因于java,也可能归因于android系统
感谢您的帮助!
编辑:这是该符号在 HTML 中出现的第一个位置:
<span id="more-22462"></span></p><p><a href="http://movieboozer.com/wp-content/uploads/2012/05/200px-Action_Comics_1.jpg" onclick="return TrackClick('http%3A%2F%2Fmovieboozer.com%2Fwp-content%2Fuploads%2F2012%2F05%2F200px-Action_Comics_1.jpg','200px-Action_Comics_1')"><img class="aligncenter size-full wp-image-22467" title="200px-Action_Comics_1" src="http://movieboozer.com/wp-content/uploads/2012/05/200px-Action_Comics_1.jpg" onclick="return TrackClick('http%3A%2F%2Fmovieboozer.com%2Fwp-content%2Fuploads%2F2012%2F05%2F200px-Action_Comics_1.jpg','200px-Action_Comics_1')" alt="" width="200" height="277" />
最佳答案
您可以使用Html.fromHtml
从 HTML 内容中检索可显示的样式文本。要从样式文本中删除图像信息,请使用以下代码:
public static Spanned removeImageSpanObjects(String inStr) {
SpannableStringBuilder spannedStr = (SpannableStringBuilder) Html
.fromHtml(inStr.trim());
Object[] spannedObjects = spannedStr.getSpans(0, spannedStr.length(),
Object.class);
for (int i = 0; i < spannedObjects.length; i++) {
if (spannedObjects[i] instanceof ImageSpan) {
ImageSpan imageSpan = (ImageSpan) spannedObjects[i];
spannedStr.replace(spannedStr.getSpanStart(imageSpan),
spannedStr.getSpanEnd(imageSpan), "");
}
}
return spannedStr;
}
关于java - 如何检测这个符号: '' (OBJ in Dashed Box) in Android,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10683749/
考虑这样的代码: trait Foo { fn foo(&self); } fn consume_func(b: Box>) { unimplemented!(); } fn prod
考虑这样的代码: trait Foo { fn foo(&self); } fn consume_func(b: Box>) { unimplemented!(); } fn prod
我不明白在 Rust 中,当我们 Box 父结构时,结构中的结构发生了什么。 struct Outer1 { child: Inner1, } struct Inner1 { n: i
我将开始开发一个新网站,并准备处理浏览器用于计算元素宽度和高度的不同方法 (box model stuff)。不知何故,我想到了:如果我只是将 box-sizing 应用于网站中的所有元素会怎么样?
在 java 应用程序中使用 box java sdk 访问 box api 时,我遇到了下面提到的错误。请指出此问题的原因。 Exception in thread "main" com.box.s
计算盒子的宽高时,outline width like outline: 5px dashed red; 如果 box-sizing:border-box,框的宽度/高度是否会考虑轮廓? 最佳答案 我
读完the subtyping chapter of the Nomicon ,我无法理解类型参数的协方差。特别是对于 Box类型,描述为:T is covariant . 但是,如果我写这段代码:
给定这段代码: trait Trait {} struct Child; impl Trait for Child {} struct Father { child: &'a Box, } i
与文件 chooser for dropbox 类似,box.com 有没有? 最佳答案 Box 目前不维护自己的“文件选择器”;然而,有一个很棒的服务叫做 filepicker.io,它充当几乎所有
感谢您对我的问题的回复:Is this a bug of Box API v2 when getting events 这是一个与此相关的新问题。问题是我不能可靠地使用从以前的调用中获得的 next_
我试图让 Box Enterprise API 使用 As-User 工作。我有一个管理员帐户,我用它来尝试检索子帐户中的内容。 我首先使用管理员帐户检索子帐户的用户ID。并将用户 ID 添加为字段“
我想在一个简单的导轨中本地查看我的 Box 帐户中的图像 app .目标是使用这些图像进行幻灯片放映。我寻找必要的参数来传递每个图像相关 url成标签。看来我只能下载图像,或从 Box 应用程序中查看
这个问题在这里已经有了答案: Why doesn't Rust support trait object upcasting? (5 个答案) 关闭 4 年前。 给定代码 trait Base {
所以基本上我尝试从https://github.com/Gor-Ren/gym-jsbsim转换这个自定义健身房环境。使用farama基金会的gymnasium api。这是我正在处理的存储库:htt
我是BOX API的新手,因此正在使用API的v2。我正在从我的应用程序本地进行REST调用。 我想上传一个以前可能上传或未上传的文件。我知道父文件夹ID和文件名。我需要覆盖现有文件,或者至少要再
我已被授予访问(协作)文件夹的权限。我需要的是每天访问该文件夹并从中获取文件。现在我生成的开发者 token 将在 1 小时后过期。有什么办法可以得到authorization code没有第一站,它
我正在尝试将 Box 中上传的文件与另一个外部系统同步。我使用哪些 API 来获取“在给定 dd/mm/yy hh:mm:ss 后上传/更新的所有文件的列表”? 干杯! 最佳答案 我认为User Ev
Vagrant 文档和 CLI 使用术语“box”和“base box”。命名意味着基本框是一种特定类型的框,但是,这些术语似乎被用作同义词。 Vagrant“盒子”和 Vagrant“基础盒子”之间
Box 允许您为文件夹创建标签,但如何从 API 中获取该信息?我在 GET /folders/{id} API 中没有看到标签返回.标签也不被视为元数据。 最佳答案 如果你看看 Fields wri
我正在尝试确定应该使用哪个版本的 Box api。我的决定取决于 v1 api 的 EOL 时间线。我不想完成我的应用程序,就在应用程序发布之前(或之后不久),v1 api 停止工作。 我很乐意使用
我是一名优秀的程序员,十分优秀!