Closed jnugent closed 2 years ago
It looks like this has been fixed in main
as part of chapter pages in #7132, but it still needs to be fixed in stable-3_3_0
. The preferred approach is here:
https://github.com/pkp/omp/blob/main/templates/frontend/components/authors.tpl#L59-L69
And that needs to be applied to:
https://github.com/pkp/omp/blob/stable-3_3_0/templates/frontend/objects/monograph_full.tpl#L139-L154
@jnugent can you test the change in this PR?
@NateWr confirmed fixed with that change.
Thanks @jnugent! Merged to stable-3_3_0
and should already be fixed in main
.
Hi @NateWr this bug seems to still exist in one other place. in stable-3_3_0
and also in main
:
https://github.com/pkp/omp/blob/main/templates/frontend/objects/monograph_full.tpl#L234
The approach merged in for the other template probably also needs to be applied here. Seen in a latest pull of stable-3_3_0.
Hi @jnugent -- there's another case in the same file. It should be resolved by applying this as well: https://github.com/pkp/omp/commit/9866c97801bf6df8516445aa7ed93379fba5755b
I'll be releasing OMP 3.3.0-9 today or tomorrow, so while I'm pretty confident this'll resolve the fix, a quick confirm would be welcome!
@asmecher I just pulled in stable-3_3_0
and confirming fixed. Thanks!
Describe the bug If a monograph has more than 5 authors, the monograph_full.tpl tempate formats the list as a comma separated list to save space. It uses the Smarty {capture} tag to wrap author names in a set of span class="label" or class="value" tags. These tags come through onto the page as escaped HTML.
Those visible span tags are added in the template via:
{capture assign="authorName"}<span class="label">{$author->getFullName()|escape}</span>{/capture}
I'm not sure if it's because there may be double escaping going on, it is escaped in the line above, and then escaped again when it is passed into the locale key via translate:
{translate key="submission.authorWithAffiliation" name=$authorName|escape affiliation=$authorAffiliation|escape}
But I've tried removing all of the escape calls and the tags still come through. Is this a problem with {capture}?
Smaller lists of authors are displayed as a regular one per line list and there is no problem.
To Reproduce Steps to reproduce the behavior:
What application are you using? OMP 3.3.0.8
Additional information Please add any screenshots, logs or other information we can use to investigate this bug report.