featdd / dpn_glossary

Glossary extension for TYPO3
http://typo3.org/extensions/repository/view/dpn_glossary
GNU General Public License v2.0
20 stars 30 forks source link

Parsing strips spaces from input (How to not ?) #176

Closed lucmuller closed 1 year ago

lucmuller commented 2 years ago

Hello,

I'm encountering a little problem with you extension which, indeed, works like a charm for it's main purpose.

This is the content i'm inputting : image <p>HTML html etc. &amp;c. e.t.c. Définition English <strong>Money</strong> Flawless Victory</p> and this is the result after parsing : image <p><acronym title="Hyper Text Markup Language" lang="en">HTML</acronym><acronym title="Hyper Text Markup Language" lang="en">html</acronym><abbr title="etcétéra" lang="">etc.</abbr><abbr title="etcétéra" lang="">&amp;c.</abbr><abbr title="etcétéra" lang="">e.t.c.</abbr><dfn title="Une définition est une proposition qui met en équivalence un élément définissant et un élément étant défini." lang="">Définition</dfn><span class="difflanguage" lang="en">English</span><strong><span class="difflanguage" title="Argent" lang="en">Money</span></strong><span class="difflanguage" lang="en">Flawless Victory</span></p> Note that I've deactivated the links on the tags, because I only need the replacement in the content for accessibility purpose.

Is there a way to prevent the trimming of the spaces ? I've looked at the parsingSpecialWrapCharacters setting, but : I'm not sure it's possible to input a space in typoscript configuration and the setting is exploded with trim explode, so I guess my space will be removed.

Any help on this topic ?

featdd commented 1 year ago

Hi @lucmuller,

sorry for the late response, I tried reproducing this but it worked as expected for me.

My parsing tags: p,strong

My input: ipsum dolor sit amet, consectetur <strong>lorem</strong> adipiscing elit

My output: ipsum dolor sit amet, consectetur <strong><a href="https://elf.test/glossar/begriff/lorem" title="Lorem Ipsum dolor sit amet" class="dpnglossary link">lorem</a></strong> adipiscing elit

Please check if you're using the latest version of this extension, I'll close this issue for now. If you have further feedback or debug information I can still reopen this.

Greetings Daniel