<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kikiki-kiki</author_name>
  <author_url>https://blog.hatena.ne.jp/kikiki-kiki/</author_url>
  <blog_title>かもメモ</blog_title>
  <blog_url>https://chaika.hatenablog.com/</blog_url>
  <categories>
    <anon>React</anon>
    <anon>JSX</anon>
    <anon>JavaScript</anon>
  </categories>
  <description>APIからエラーの時、改行コード付きの文字列が返ってくるので、改行を &lt;br&gt; に変換して出力したかったのメモ 例えばこんな文字列を改行させて表示させたい const msg = &quot;星宮いちご\n霧矢あおい\n紫吹蘭&quot;; タグが入っていても文字列は文字列として出力される 改行コードを &lt;br&gt; に変換するのは /\n/g や /\r\n|\n/g とかで replace すれば OK APIから返ってくるようなデータなら /\n/g で良さそうな気がする str.replace で変換したものを children として出力しようとしても文字列なので文字列として出力される // const m…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fchaika.hatenablog.com%2Fentry%2F2020%2F07%2F12%2F083000&quot; title=&quot;React 文字列を改行付きにして出力したい - かもメモ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://m.media-amazon.com/images/I/51G1Boib67L._SL160_.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-07-12 08:30:00</published>
  <title>React 文字列を改行付きにして出力したい</title>
  <type>rich</type>
  <url>https://chaika.hatenablog.com/entry/2020/07/12/083000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
