SurveyThemeHelper.php
About Theme Options Path Treatment - Theme Options Path Prefix =========================
Path sanitization is applied to all Theme Options ('options' attribute) that match an existing path or a "virtual" path.
The paths allowed in Theme Options are restricted to three categories:
- General Files: Files under
/generalfiles - Theme Files: Files under the theme folder
- Survey Files: Files under
/surveys/ /images
Please note that the paths must point to files inside those folders, so path traversal is not allowed.
To be clear about which of those categories the path belongs to, a prefix is added, making it a "virtual" path.
- General Files: image::generalfiles::
- Theme Files: image::theme::
- Survey Files: image::survey::
Paths are considered invalid if:
- The path starts with one of the prefixes mentioned above but the file doesn't exist inside the category's folder.
- The path matches a real path to an existing file (either relative to the root of LS installation, to the current working dir or absolute), but the file is not inside one of the categories folders.
After sanitization, valid paths are converted to virtual paths, and invalid paths are prefixed with "invalid:".
NOTE: Paths that don't have one of the category prefixes but don't match an existing file are left untouched, because there is no way to be 100% * sure that they are actual paths.
Table of Contents
Classes
- SurveyThemeHelper
- General helper class for survey themes