Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007769TestLinkDocumentation (Install, User Manual, help)public2016-12-02 09:172018-04-19 11:12
ReporterDierickxD71 
Assigned Tofman 
PrioritynormalSeverityminorReproducibilityN/A
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version1.9.15 (2015 Q4) 
Fixed in Version 
Summary0007769: renderGhostSteps - why remove '

', '

',' ' ?

DescriptionIn testcase.class.php , function renderGhostSteps , you use $replaceSetWebRichEditor to remove '

', '

',' '
Why do this?
This breaks the entire layout of a testcase.
The editor uses/inserts

tags as "new lines". So instead of having multiple lines displayed, all data is shown as 1 long line, without newlines.

What was the original issue you experienced at the time?
You inserted these comments:
> // I've discovered that working with Web Rich Editor generates
> // some additional not wanted entities, that disturb a lot
> // when trying to use json_decode().

TagsNo tags attached.
Database (MySQL,Postgres,etc)MySQL
Browser
PHP Version
TestCaseID
QA Team - Task Workflow Status
Attached Filesjpg file icon screenshot1.jpg [^] (81,602 bytes) 2016-12-07 07:53


jpg file icon screenshot2.jpg [^] (109,795 bytes) 2016-12-07 07:53


jpg file icon screenshot3.jpg [^] (105,899 bytes) 2016-12-07 07:53


txt file icon testcase.class.php.txt [^] (257,067 bytes) 2017-01-26 13:52 [Show Content]

- Relationships

-  Notes
(0025653)
DierickxD71 (reporter)
2016-12-02 09:18

Ughhh, no check on HTML input in Mantis.

> $replaceSetWebRichEditor = array('< / p >', '< p >','& nbsp ;');
(0025660)
fman (administrator)
2016-12-06 23:15

after note 25653, can we consider issue still present?
if yes, please provide really detailed steps to reproduce
(0025682)
DierickxD71 (reporter)
2016-12-07 07:45

Yes, the issue is still present. Not 25653 was to clarify the strange display in 'summary' and in 'description'.

Steps to reproduce:

Step 1: create a testcase 'test 1 (original)', with 1 step, and in field 'actions' input some multiline text, see attachment 'screenshot1.jpg' (left side = edit mode, right side = display mode)
==> you can clearly see multiple lines

Step 2: create a copy of testcase 'test 1 (original)' , BUT !!! choose for ghost steps , call testcase 'test 2 (ghost from test 1)'

Step 3: view the 'ghost' testcase, see attachment 'screenshot2.jpg' (left side = edit mode, right side = display mode)
==> the multiple lines are NOT visible !!!

Step 4: in 'testcase.class.php' , the function renderGhostSteps, change this line: (remove extra spacing!!)
> $replaceSetWebRichEditor = array('< / p >', '< p >','& nbsp ;');
into
> $replaceSetWebRichEditor = array($ tlEndMark, '& nbsp ;');

Step 5: refresh the view of the 'ghost' testcase, see attachment 'screenshot3.jpg' (left side = edit mode, right side = display mode)
==> the multiple lines are visible again
(0025931)
DierickxD71 (reporter)
2017-01-26 13:50

So okay, i tried to "fix" this issue. (for us)
I've attached the source (as txt file ;) ) with the changes i did to function renderGhostSteps

I tested these situations:

1) Simple [ghost] testcase, no extra text, with or without the extra "< p >" that the Web Rich Editor generates.
-> success, correct generated html

2) [ghost] testcase with:
2a) 1st line regular text, 2nd line [ghost]
-> success, correct generated html
2b) 1st line [ghost], 2nd line regular text
-> success, correct generated html

3) [ghost] testcase with:
3a) on the same line, 1st regular text, space, directly followed by [ghost]
-> missing closing "< / p >" , but original layout is OK
3b) on the same line, 1st [ghost], space, directly followed by regular text
-> missing opening "< p >", and 4 characters lost of the following text

4) [ghost] testcase with 1st [ghost] , 2nd line different [ghost]
-> missing closing "< / p >" , but original layout is OK


I realize this solution is not complete, but for us this solution is as good as it gets, for the moment.
Once i have more time I'll try to perfect this routine.

- Issue History
Date Modified Username Field Change
2016-12-02 09:17 DierickxD71 New Issue
2016-12-02 09:18 DierickxD71 Note Added: 0025653
2016-12-06 23:15 fman Note Added: 0025660
2016-12-06 23:15 fman Assigned To => fman
2016-12-06 23:15 fman Status new => feedback
2016-12-07 07:45 DierickxD71 Note Added: 0025682
2016-12-07 07:45 DierickxD71 Status feedback => assigned
2016-12-07 07:53 DierickxD71 File Added: screenshot1.jpg
2016-12-07 07:53 DierickxD71 File Added: screenshot2.jpg
2016-12-07 07:53 DierickxD71 File Added: screenshot3.jpg
2017-01-26 13:50 DierickxD71 Note Added: 0025931
2017-01-26 13:52 DierickxD71 File Added: testcase.class.php.txt



Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker