View Issue Details

This issue affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
05915Bug reportspublic2026-11-19 22:24
ReporterTMSWhite Assigned ToTMSWhite  
PrioritylowSeverityminor 
Status closedResolutionno change required 
Summary05915: EM unit test errors - embedded newlines, and escaping html entities
Description

There are still a few dozen errors on EM unit tests (Unit Tests of Isolated Expressions) that may be fixable. Most seem to relate to string handling (e.g. whether the EM tokenizer, PHP, and JavaScript handle escaped characters equivalently).

Steps To Reproduce

see test cases in Unit Tests of Isolated Expressions, especially

PROBLEMS WITH EMBEDDED NEWLINES:

nl2br('hi\nthere\nhow\nare\nyou?')
nl2br(implode('\n', 'hi', 'there,', 'user!'))

PROBLEMS WITH HTML ENTITIES:

addslashes()
htmlspecialchars()
htmlspecialchars_decode()
htmlentities()
html_entity_decode()

Additional Information

The way that EM tests that the PHP and JavaScript results are the same may partly be a culprit for this behavior; and some of the unit tests may have the wrong expected value.

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)120314
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMysql 5.3
Server OS (if known)Windows XP
Webserver software & version (if known)XAMPP
PHP Version5.3
Git branch / Pull Request URL

Relationships

related to 05988 closedc_schmitz Problem displaying words with French accent within Expression Manager 

Users monitoring this issue

There are no users monitoring this issue.

Activities

galads

galads

2021-12-30 11:36

reporter   ~67878

Hello TMSWhite,
This should already be fixed in recent versions.
Can you please check if this issue still exists in the latest version of LimeSurvey and let us know?
Thank you!

c_schmitz

c_schmitz

2026-11-19 22:24

administrator   ~87745

The 'Unit Tests of Isolated Expressions' page this report refers to was removed from LimeSurvey long ago. Expression Manager is now covered by PHPUnit tests in tests/unit/helpers, so these old test failures can no longer be reproduced or acted on as described. Closing as obsolete; please open a new report if a specific escaping difference between PHP and JavaScript still shows up in LimeSurvey 7.

Issue History

Date Modified Username Field Change
2012-03-14 18:26 TMSWhite New Issue
2012-03-15 01:35 c_schmitz Assigned To => TMSWhite
2012-03-15 01:35 c_schmitz Status new => assigned
2012-04-07 18:44 TMSWhite Relationship added related to 05988
2012-04-11 17:56 TMSWhite Project Bug reports => @10@
2021-12-30 11:36 galads Note Added: 67878
2021-12-30 11:36 galads Status assigned => feedback
2026-11-19 22:24 c_schmitz Note Added: 87745
2026-11-19 22:24 c_schmitz Bug heat 2 => 4
2026-11-19 22:24 c_schmitz Status feedback => closed
2026-11-19 22:24 c_schmitz Resolution open => no change required
2026-11-19 22:24 c_schmitz Product Version 1.92+ =>
2026-11-20 10:33 c_schmitz Category Survey taking => (No Category)