# 帖子重建后，摘要被 onebox URL 污染

**URL:** <https://meta.discourse.org/t/excerpts-are-being-poisoned-by-onebox-urls-on-post-rebuild/166372>\
**Category:** Support\
**Created:** [2020年十月6日 12:19 UTC](https://meta.discourse.org/t/excerpts-are-being-poisoned-by-onebox-urls-on-post-rebuild/166372 "2020-10-06T12:19:45Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [2020年十月7日 19:46 UTC](https://meta.discourse.org/t/excerpts-are-being-poisoned-by-onebox-urls-on-post-rebuild/166372/2 "2020-10-07T19:46:12Z")

</div>

好的，我已在“主题列表预览”中添加了代码，以隐藏摘要中的链接。详见：

> [@Topic List Previews (legacy)](https://meta.discourse.org/t/topic-list-previews/101646/1324?u=merefield):
>
> Hey, this [annoyed me so much](https://meta.discourse.org/t/excerpts-are-being-poisoned-by-onebox-urls-on-post-rebuild/166372) I’ve added code to remove links in excerpts (and a setting if you want to leave them alone). Currently this is only in the TC: [https://github.com/merefield/discourse-topic-previews/commit/bdd7ba0baeb1bafc06658379a15affc0e861b7fd](https://github.com/merefield/discourse-topic-previews/commit/bdd7ba0baeb1bafc06658379a15affc0e861b7fd) NB: Update the TC first, then the theme sidecar plugin (you need both for this to work). The result is now much cleaner and you can rebuild posts with oneboxes all you like and the links will not appear in the preview excerpt +1

请注意，PrettyText 选项似乎只能移除链接本身，而无法移除链接文本，因此我几乎是采用“蛮力”方式来实现这一功能的。

---

_[View the full topic](https://meta.discourse.org/t/excerpts-are-being-poisoned-by-onebox-urls-on-post-rebuild/166372)._
