Problem/Motivation
Currently the module theme pickups the rendered HTML and pass it to template as seen here. This is known as early render.
While this might suffice for simple needs, at least not totally broken, it causes 2 not-so-obvious issues:
data:image/svgplaceholder is stripped out by the render engine causing 404 as being read by browsershttps://../image/svg. Note, the missingdata:scheme. This issue is pretty similar to Views Rewrite result as noted at Blazy project home. This issue was worked around by JS, but not optimal at subsequent AJAX loaded contents.- Any HTML tags are stripped out by Renderer via
Xss::filterAdmin, the most obvious isbuttonwhich are used by Slick navigation. Other HTML remains intact. This issue can be resolved with#allowed_tags, but may require more future checks with unknown HTML tags which are normally passed via caption fields.
Proposed resolution
Consider refactoring the module #pre_render to take over original #pre_render so to avoid the early render problem.
Remaining tasks
Write patch, review.
User interface changes
None.
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3243726-refactor-prerender-2.patch | 9.98 KB | gausarts |
Comments
Comment #2
gausarts commentedInitial attempts.
Comment #4
gausarts commentedImprovements may follow as usual. Thanks.