# API 対 フォーム: 編集時にコンテンツの不一致

**URL:** <https://meta.discourse.org/t/api-vs-form-content-mismatch-when-edited/270492>\
**Category:** Support\
**Created:** [2023 年 7 月 4 日午前 9:21 UTC](https://meta.discourse.org/t/api-vs-form-content-mismatch-when-edited/270492 "2023-07-04T09:21:40Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [2023 年 7 月 4 日午前 10:12 UTC](https://meta.discourse.org/t/api-vs-form-content-mismatch-when-edited/270492/4 "2023-07-04T10:12:07Z")

</div>

インポートされたHTMLコンテンツをサニタイズしようとしている場合、段落を改行に置き換えることもできるため、改行が確実に存在し、投稿が適切に処理されるようになります。

```html
<p>some text</p><p>some other text</p>

```

は次のようになります。

```plaintext
\nsome text\n\nsome other text\n

```

そして次のようにレンダリングされます。

* * *

some text

some text

* * *

---

_[View the full topic](https://meta.discourse.org/t/api-vs-form-content-mismatch-when-edited/270492)._
