diff --git a/doc/api.rst b/doc/api.rst
index f6619473c..937f6b800 100644
--- a/doc/api.rst
+++ b/doc/api.rst
@@ -94,15 +94,19 @@ The following options are available:
replace them with a ``null`` value. When set to ``true``, Twig throws an
exception instead (default to ``false``).
-* ``autoescape``: If set to ``true``, auto-escaping will be enabled by default
- for all templates (default to ``true``). As of Twig 1.8, you can set the
- escaping strategy to use (``html``, ``js``, ``false`` to disable). As of Twig
- 1.9, you can set the escaping strategy to use (``css``, ``url``,
+* ``autoescape``: If set to ``true``, HTML auto-escaping will be enabled by
+ default for all templates (default to ``true``).
+
+ As of Twig 1.8, you can set the escaping strategy to use (``html``, ``js``,
+ ``false`` to disable).
+
+ As of Twig 1.9, you can set the escaping strategy to use (``css``, ``url``,
``html_attr``, or a PHP callback that takes the template "filename" and must
return the escaping strategy to use -- the callback cannot be a function name
- to avoid collision with built-in escaping strategies). As of Twig 1.17, the
- ``filename`` escaping strategy determines the escaping strategy to use for a
- template based on the template filename extension.
+ to avoid collision with built-in escaping strategies).
+
+ As of Twig 1.17, the ``filename`` escaping strategy determines the escaping
+ strategy to use for a template based on the template filename extension.
* ``optimizations``: A flag that indicates which optimizations to apply
(default to ``-1`` -- all optimizations are enabled; set it to ``0`` to
diff --git a/test/Twig/Tests/Fixtures/autoescape/filename.test b/test/Twig/Tests/Fixtures/autoescape/filename.test
new file mode 100644
index 000000000..b091ad34d
--- /dev/null
+++ b/test/Twig/Tests/Fixtures/autoescape/filename.test
@@ -0,0 +1,18 @@
+--TEST--
+"filename" autoescape strategy
+--TEMPLATE--
+{{ br -}}
+{{ include('index.html.twig') -}}
+{{ include('index.txt.twig') -}}
+--TEMPLATE(index.html.twig)--
+{{ br -}}
+--TEMPLATE(index.txt.twig)--
+{{ br -}}
+--DATA--
+return array('br' => '
')
+--CONFIG--
+return array('autoescape' => 'filename')
+--EXPECT--
+<br />
+<br />
+