tine-groupware / tine

tine groupware main repository
https://www.tine-groupware.de
GNU Affero General Public License v3.0
14 stars 2 forks source link

html-proxy isn't replaced #34

Closed ignoreigor closed 4 months ago

ignoreigor commented 8 months ago

Hi,

having a look on 2024.12.x , I noticed one little thing: in addressbook's detail-pane or in calender-app when showing appointment details and attendees, some html-proxies aren't replaced in titles of contact's details or attendee information. Other contacts are shown correctly.

<em id="html-proxy-20000" class="html-proxy"></em> (some.mail@address.com)

Addressbook: grafik

Calendar: grafik

Looking for the difference between working an wrong contacts, I first thought it was caused by missing displaynames, but displaynames were always set and the entries are looking similar in the database. The crucial hint was not to look for something missing but something additional! Only contacts with mail addresses are affected. When mail addresses are displayed in these places, something seems so fail.

github-actions[bot] commented 7 months ago

This issue is stale because it has been open 30 days with no activity. Comment or remove the stale label. Otherwise, it will be closed in 7 days.

ignoreigor commented 7 months ago

Still the same behaviour in weekly-2024.17.1

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 30 days with no activity. Comment or remove the stale label. Otherwise, it will be closed in 7 days.

ignoreigor commented 5 months ago

There isn't any fix in weekly-2024.22.1 for that issue.

pschuele commented 5 months ago

hi, I can't reproduce this behaviour. it would be great if you could send me the json representation of one of the "broken" contacts / attendee.

ignoreigor commented 5 months ago

hi, I can't reproduce this behaviour. it would be great if you could send me the json representation of one of the "broken" contacts / attendee.

Hi,

of course. Here is the json-object from Michael Mustermann, I edited some personal data in created_by manually. It was created with latest weekly-2024.24.1 mustermann.json

grafik

Deleting the mail-address, i get the following json and contact is display correctly mustermann_ohne_mail.json

ignoreigor commented 4 months ago

I did some debugging, using Tinebase-3d8ac0412730ebd551d6-FAT.js

Problem is, in function replaceDomProxy(html)
const el = doc.getElementById(this.id); returns null, in cases the proxy is not replaced.

That is affected by the replaced element, normally <em id="html-proxy-1" class="html-proxy"> ,which is already html-encoded and no longer an element but &lt;em id="html-proxy-1" class="html-proxy"&gt;&lt;/em&gt; when showing an email-address. So it can't be replaced and the html-source remains visible in frontend.

pschuele commented 4 months ago

thanks for the debugging @ignoreigor @ccheng-dev can you have a look at this problem?

pschuele commented 4 months ago

we are working on a fix, coming for 2024.11 and the weekly releases.

pschuele commented 4 months ago

fixed with https://github.com/tine-groupware/tine/commit/aaf0c40ec3e0c5add9660092dced9f78e9859280

ccheng-dev commented 4 months ago

here is the result after fix :

Screenshot from 2024-07-09 14-05-04

ignoreigor commented 4 months ago

Looks great. Thank you for fixing. I'll have a look at the next weekly, as I am too lazy to build it myself.

Edit: weekly-2024.28.1 does work as it should.