pluginsGLPI / formcreator

GLPI Plugin Formcreator (DOWNLOAD : https://github.com/pluginsGLPI/formcreator/releases)
http://www.teclib-edition.com
GNU General Public License v3.0
174 stars 125 forks source link

Problem: Issue with Link Generation in GLPI: URLs Incorrectly Modified #3528

Open jonaricci opened 2 months ago

jonaricci commented 2 months ago

Issue Description:

When trying to create a dynamic link in GLPI using the ##answer_32## tag, the resulting link is being incorrectly modified. Instead of using the provided full URL, GLPI seems to be adding an unwanted prefix or altering the URL incorrectly.

Code Used:

<strong>Sitio web: <a href="https://##answer_32##" target="_blank" rel="noopener">##answer_32##</a></strong>

Observed Behavior:

When ##answer_32## is replaced with a URL like https://google.com, the resulting link becomes:

https://172.16.10.122google.com

Expected Behavior:

The link should direct to the full URL, in this case:

https://google.com

Steps to Reproduce:

Insert the following code into a GLPI field:

<strong>Plataform: <a href="https://##answer_32##" target="_blank" rel="noopener">##answer_32##</a></strong>

Replace ##answer_32## with a valid URL, such as google.com
Observe the generated link and verify that it is incorrectly modified.

Environment:

GLPI Version: 10.0.16
Browser/Client: Mozilla Firefox

Additional Notes:

I have attempted various approaches to resolve the issue, including adjusting the link format and checking configurations, but the problem persists. This appears to be a URL handling issue in GLPI that needs to be investigated and addressed.

Images Before and After Modifying with HTML

Captura desde 2024-09-03 14-16-50 Captura desde 2024-09-03 14-17-08 Captura desde 2024-09-03 14-17-41

btry commented 2 months ago

Hi

I reproduced and it appears that the URL is modified by the rich text editor. Maybe because the URL in the text does not matches anything consistent due to the ##answer_32## tag.

The constraints of the editor and GLPI framework together makes this very hard or impossible to fix :(