Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.1RC2][0.90][0.85]Bug with "<" in ticket description #140

Closed
ladenree76000 opened this issue Sep 28, 2015 · 46 comments · Fixed by #9011
Closed

[9.1RC2][0.90][0.85]Bug with "<" in ticket description #140

ladenree76000 opened this issue Sep 28, 2015 · 46 comments · Fixed by #9011
Assignees
Labels
Milestone

Comments

@ladenree76000
Copy link
Contributor

When creating a ticket ( helpdesk, collector) with description :
"le temps de réponse passe de < 1ms à < 200ms" it is ok
but when no spaces between < and next caracter then description is truncated :
"le temps de réponse passe de <1ms à <200ms" ->bug

ver 0.85.4 or On line 0.90 DEMO ->bug
in 0.83.8 it seems ok

@ladenree76000
Copy link
Contributor Author

when looking the descriptions, it is truncated, but when mouse over "information" the full text is displayed in the "pop up window".

@orthagh
Copy link
Contributor

orthagh commented Sep 30, 2015

with rich text enabled ?

@ladenree76000
Copy link
Contributor Author

[0.90-RC1 on WAMP server browser: chrome] rich text diabled, typing in description " temps de réponse passe de <8ms à>400ms" displays "temps de réponse passe de 400ms" tooltip text is OK

rich text enabled, typing in description " temps de réponse passe de <8ms à plus de >400ms " displays
temps de réponse passe de <8ms plus="" de="">400ms
( à disappeard, = and double quote added)
tooltip text is OK

(same behaviour on line demo ticket 27425)
same behavior with IE8

@orthagh
Copy link
Contributor

orthagh commented Oct 1, 2015

Can't find where's bug occurs on http://demo.glpi-project.org/front/ticket.form.php?id=27425
Could you attach a screenshot ?

@ladenree76000
Copy link
Contributor Author

today, the ticket description is not truncated anymore on onlineDemo. ! (with FF & IE8 OK)
Sure it was few days earlier.
rich text is disabled on on line demo.

@ladenree76000
Copy link
Contributor Author

this is a screenshot showing tooltip text & description looking different.
ver 0.85.4. browser MS EDGE (but same with IE8, chrome, FF)
this was the same on on line demo but not any more.

image

@ladenree76000
Copy link
Contributor Author

0.90 RC2 :
image

@orthagh
Copy link
Contributor

orthagh commented Oct 13, 2015

I worked 2 hours on this bug
Can't find a configuration to avoid the first < to be dectected as a html tag.

Currently trying a double encoding but I'm not confident

@yllen yllen added the bug label Oct 16, 2015
@yllen yllen added this to the 0.90.1 milestone Oct 16, 2015
@yllen yllen self-assigned this Oct 16, 2015
@yllen
Copy link
Collaborator

yllen commented Oct 16, 2015

I try to fix in ONLY for 0.85 for the moment.
Can you test it?
Be careful: this correction work only for new text. You must correct description or create a new ticket.
If OK for you, i'll do the same correction for 0.90

@orthagh
Copy link
Contributor

orthagh commented Oct 22, 2015

@ladenree76000 have you test this correction ?

@ladenree76000
Copy link
Contributor Author

no, since my 0.85 is now upgraded to 0.90 (test & prod).

@orthagh
Copy link
Contributor

orthagh commented Oct 23, 2015

@ladenree76000, You could even so test the 0.85 patch on your 0.90 test instance :
https://github.com/glpi-project/glpi/commit/a1f2e1e5f78f414d720a3ec5d940d98eb7906117.patch

patch -p1 < /tmp/a1f2e1e5f78f414d720a3ec5d940d98eb7906117.patch 
patching file inc/ticket.class.php
Hunk #1 succeeded at 4226 (offset 129 lines).
Hunk #2 FAILED at 4110.
Hunk #3 succeeded at 6036 with fuzz 1 (offset 70 lines).
1 out of 3 hunks FAILED -- saving rejects to file inc/ticket.class.php.rej
patching file inc/toolbox.class.php
Hunk #1 succeeded at 327 (offset 4 lines).
Hunk #2 succeeded at 351 (offset 4 lines).

"Hunk #2 FAILED" is nothing, a change in a space who doesn't affect the current correction

@orthagh
Copy link
Contributor

orthagh commented Oct 23, 2015

@yllen, in the end, if tested on my instance, no changes.

I think the issue isn't in db storage but more a tinyMCE bug.
If i save directly in db the sentence "temps de réponse passe de <8ms à plus de >400ms", issue apppears.

It's precisly at "<8" who is detected as opening html tag...
I can't figure a fix for this (maybe a preg_replace on <([0-9]1), < $1 )

@yllen
Copy link
Collaborator

yllen commented Oct 23, 2015

Orthagh,
Comme je l'ai précisé, il n'y a pas de solution pour les données mal enregistrées. Mais si tu corriges dans ta description en remettant ce qui est correct, l'affichage sera OK.
Testé chez moi OK, testé par Remi OK également

@orthagh
Copy link
Contributor

orthagh commented Oct 23, 2015

Effectivement, il reste cependant encore une problèmatique :
image

la description se voit ajouter des


(j'ai copié le même texte dans le titre et la description)

@yllen
Copy link
Collaborator

yllen commented Oct 23, 2015

ben moi j'ai plus le problème
richtext

@ladenree76000
Copy link
Contributor Author

I would be pleased to help by testing this patch, but i dont know how to apply on my wamp server ;-(

@orthagh
Copy link
Contributor

orthagh commented Oct 26, 2015

ok, @yllen, reporte sur le master, on fera un test final dessus et on pourra fermer je pense.

@ladenree76000
Copy link
Contributor Author

installer le master pour tester : ça je sais faire ;-}

yllen added a commit that referenced this issue Oct 30, 2015
@orthagh
Copy link
Contributor

orthagh commented Oct 30, 2015

cherry-picked sur le master.

@orthagh orthagh closed this as completed Oct 30, 2015
@orthagh orthagh reopened this Nov 27, 2015
@orthagh
Copy link
Contributor

orthagh commented Nov 27, 2015

j'ouvre à nouveau.
Je reproduis à nouveau le <p>...</p>, @tsmr aussi il me semble.

Avec le rich text activé, ça se produit lors de la création du ticket

@yllen yllen closed this as completed in 38437a8 Nov 27, 2015
orthagh added a commit that referenced this issue Nov 27, 2015
@troublestarter
Copy link

Exist in 9.2.3 !

@tuxxic
Copy link

tuxxic commented Oct 31, 2019

Still exists in 9.4.4 / the workaround of adding the backquote doesn't work in the mail notification, the text is still truncated.

Is there a workaround available to display < and > in the mail notifications ?

@cedric-anne
Copy link
Member

This has been fixed in master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants