Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

Listing ulrs in Not...
 
Notifications
Clear all

Listing ulrs in Notes adds line breaks when displayed

7 Posts
3 Users
0 Reactions
8,649 Views
J Xavier
(@jxavier)
Posts: 5
Active Member
Topic starter
 
[#1919]

STR:
-------
- On an existing project create a note
- Add the text
1. http://track.projeqtor.org/view/main.php
2. http://track.projeqtor.org/view/main.php
3. http://track.projeqtor.org/view/main.php
- Click OK to save

Expected Result:
----------------------
1. http://track.projeqtor.org/view/main.php
2. http://track.projeqtor.org/view/main.php
3. http://track.projeqtor.org/view/main.php

Actual Result:
------------------
1. http://track.projeqtor.org/view/main.php
2. http://track.projeqtor.org/view/main.php
3. http://track.projeqtor.org/view/main.php


 
Posted : 22 Jul 2014 18H29
(@babynus)
Posts: 14952
Member Admin
 

Hi,

I cannot reproduce.
Have a look at ticket on Demo : http://demo.projeqtor.org/view/main.php?directAccess=true&objectClass=Ticket&objectId=53
Note is correctly displayed.
And I ckecked Database : value is correct.

Where exactly do you get this display ?


 
Posted : 24 Jul 2014 1H01
J Xavier
(@jxavier)
Posts: 5
Active Member
Topic starter
 

You are right, the http:// is missing at the begining of each url (I just realized that the forum hides that part when the message is posted)

1. http://track.projeqtor.org/view/main.php
2. http://track.projeqtor.org/view/main.php
3. http://track.projeqtor.org/view/main.php

I have added a new note in http://demo.projeqtor.org/view/main.php?directAccess=true&objectClass=Ticket&objectId=53 and it's displayed as 1. http://track.projeqtor.org/view/main.php
2. http://track.projeqtor.org/view/main.php
3. http://track.projeqtor.org/view/main.php


 
Posted : 24 Jul 2014 1H50
(@babynus)
Posts: 14952
Member Admin
 

It's clear now !

Ticket #1470 recorded.

Thanks for reporting the issue.


 
Posted : 24 Jul 2014 18H03
(@jean-luc)
Posts: 73
Active Member
 

Found the same problem.
Cause located, but it’s a complex "preg_replace" function that I don’t handle very well.

Comment line 1473 (in V4.3.2) of the module /view/objectDetail.php to by-pass the problem.
Links are no more converted in clickable links, but the erroneous 'br' has vanished. 😉


 
Posted : 25 Jul 2014 16H29
(@babynus)
Posts: 14952
Member Admin
 

Hi,

Thanks Jean Lic for this workaround.

It fact global fix will be deployed in V4.4

Fix is in objectDetail.php, line 1472, replace :

      $strDataHTML = htmlEncode($note->note,'print');
      $strDataHTML = preg_replace('@(https?://([-w.]+[-w])+(:d+)?(/([w/_.#-]*(?S+)?[^.s])?)?)@', '$1', $strDataHTML);
      echo $strDataHTML;

with

      $strDataHTML = htmlEncode($note->note,'');
      $strDataHTML = preg_replace('@(https?://([-w.]+[-w])+(:d+)?(/([w/_.#-]*(?S+)?[^.s])?)?)@', '$1', $strDataHTML);
      $strDataHTML = nl2br($strDataHTML);
      echo $strDataHTML;

 
Posted : 25 Jul 2014 17H46
(@jean-luc)
Posts: 73
Active Member
 

OK, that works ! 🙂


 
Posted : 25 Jul 2014 18H27
Share:

Scroll to Top