snoopdave opened a new pull request, #366: URL: https://github.com/apache/roller/pull/366
A smaller alternative to #335 (1,300 lines instead of 4,180). It keeps #335's template isolation and output/time limits, and leaves out the in-memory render budget (`RenderLimitParser`, `RenderLimitUberspector`, `StringGrowth`, `DeadlineRegex`, `ValueLimits`). - **Templates per weblog.** While a weblog renders, `#parse` and `#include` load only that weblog's stored templates. Inline macros are local to the template that defines them (`local_scope=true`, `replace_global=true`). Library macros stay global. Error pages no longer show template ids. - **Output and time limits.** A render fails, and is not cached, once it writes more than `rendering.maxOutputChars` (10 MB), inserts a longer string, or runs past `rendering.maxRenderSeconds` (30 s). Writes, reference insertions and every `#foreach` pass check the limits. A `#foreach` of more than 100,000 passes fails the render. - **Status.** All 28 test classes under `ui/rendering` pass on JDK 11 and 17 (121 tests). Not covered: a single call that builds a huge string in memory (for example `$s.repeat(n)`), a slow regex, or macro recursion that never writes or loops. The deadline can't stop these. That is the part of #335 left out here. Behavior change: a custom theme that calls a macro defined in a template it doesn't `#parse` now prints the call as text. See CHANGES.md. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
