<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gfx</author_name>
  <author_url>https://blog.hatena.ne.jp/gfx/</author_url>
  <blog_title>Islands in the byte stream (legacy)</blog_title>
  <blog_url>https://gfx.hatenadiary.org/</blog_url>
  <categories>
    <anon>perl</anon>
  </categories>
  <description>最近Xslateの自動エスケープ機能について考えていたのですが、これは「この機能によって安全性が高まる」というものではなく（結果的にそうでないものより安全ではありますが）、むしろテンプレートエンジンとしてはこれこそ正しい振る舞いなのではないかと思うに至りました。 この「値を渡すと、ソースコードに埋め込む際に適当に加工する」という振る舞いは、SQLとプレースホルダの振る舞いがまさにそうです。SQLに値を埋め込む際、アプリケーションでいちいち値をエスケープするというのは危険であり、避けるべきです。可能であれば常にプレースホルダを使うという方針をとるだけで、エスケープ問題について余計なことを考える必…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgfx.hatenadiary.org%2Fentry%2F20100822%2F1282469200&quot; title=&quot; テンプレートエンジンの自動エスケープ機能について - Islands in the byte stream (legacy)&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2010-08-22 18:26:40</published>
  <title> テンプレートエンジンの自動エスケープ機能について</title>
  <type>rich</type>
  <url>https://gfx.hatenadiary.org/entry/20100822/1282469200</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
