luci-base: dispatcher: support raw values in attr() and ifattr()
authorJo-Philipp Wich <jo@mein.io>
Tue, 12 Feb 2019 07:28:21 +0000 (08:28 +0100)
committerJo-Philipp Wich <jo@mein.io>
Tue, 12 Feb 2019 07:34:01 +0000 (08:34 +0100)
commit28e852f4e06303d313ac06b0b0c9d5e4dd3b13a0
tree7857ae0d6fd15daa0f4c7a0d339f045fa8168334
parenta0ae6c97f3b57b3c581341cd392e4da4a7418a61
luci-base: dispatcher: support raw values in attr() and ifattr()

Extend the attr() and ifattr() template functions to take an optional
further parameter indicating that the passed value should not be escaped.

This is needed for cases where the input already is escaped through
other means, e.g. when the value was previously filtered through the
striptags() template helper.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 4141243762aafb7960d67f871c97907307005f87)
modules/luci-base/luasrc/dispatcher.lua