You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where the excerpt from a channel entry shown in search results contains a template variable, this variable is expanded/replaced after the search excerpt is generated. This is consistent with the template rendering order shown at https://docs.expressionengine.com/latest/templates/engine.html, but can create some inappropriate effects:
The resulting excerpt can be significantly longer than the documented excerpt length of 50 words.
The resulting excerpt will retain any markup present in the template variable. This can cause unintended presentation effects when displaying search results, and contradicts the documentation, which states that "HTML markup is stripped prior to output".
Notwithstanding the standard EE template processing order, search excerpts should be generated — including limiting to 50/n words, and stripping markup — after all EE tags have been rendered, including template variables.
EE 6.0.4
The text was updated successfully, but these errors were encountered:
Unfortunately at the moment when the included template variable (such as {logged_in_screen_name} ) is parsed, the parser already is not aware about context - whether is is displaying as part of {excerpt} (so needs to be limited to 50 characters) or as part of {full_text} (so no limit should be applied)
Personally I think that because the included variable's contents is not included in search, it should also not be included into search results - so all included template variable tags should be removed.
Removing template variable tags completely from search excerpts seems a good practical solution to this. I'd be more than okay with that, if it's relatively easy to implement.
Where the excerpt from a channel entry shown in search results contains a template variable, this variable is expanded/replaced after the search excerpt is generated. This is consistent with the template rendering order shown at https://docs.expressionengine.com/latest/templates/engine.html, but can create some inappropriate effects:
The resulting excerpt can be significantly longer than the documented excerpt length of 50 words.
The resulting excerpt will retain any markup present in the template variable. This can cause unintended presentation effects when displaying search results, and contradicts the documentation, which states that "HTML markup is stripped prior to output".
Notwithstanding the standard EE template processing order, search excerpts should be generated — including limiting to 50/n words, and stripping markup — after all EE tags have been rendered, including template variables.
EE 6.0.4
The text was updated successfully, but these errors were encountered: