Issue Details (XML | Word | Printable)

Key: MDL-13975
Type: Bug Bug
Status: Reopened Reopened
Priority: Minor Minor
Assignee: Petr Skoda
Reporter: Nicolas Martignoni
Votes: 0
Watchers: 2
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

p() and s() should not be used to print lang strings

Created: 19/Mar/08 07:08 PM   Updated: 06/Nov/09 02:50 AM
Return to search
Component/s: Languages, Lib
Affects Version/s: 1.9.3
Fix Version/s: None

Issue Links:
Relates

Participants: Dongsheng Cai, Nicolas Martignoni, Petr Skoda and Tim Hunt
Security Level: None
QA Assignee: Dongsheng Cai
Resolved date: 19/Mar/08
Affected Branches: MOODLE_19_STABLE


 Description  « Hide
HTML entities like   or   don't get parsed by function p() and print litteraly, e.g. $string['usergroupmembership'] in group/members.php, line 281.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Petr Skoda made changes - 19/Mar/08 07:44 PM
Field Original Value New Value
Assignee Koen Roggemans [ koen ] Petr Skoda [ skodak ]
Petr Skoda made changes - 19/Mar/08 07:48 PM
Fix Version/s 1.9.1 [ 10240 ]
Summary p() doesn't parse entity   in language strings p() and s() should not be used to print lang strings
Petr Skoda made changes - 19/Mar/08 07:49 PM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Nicolas Martignoni made changes - 31/Mar/08 07:08 PM
Link This issue has been marked as being related by MDL-14103 [ MDL-14103 ]
Dongsheng Cai made changes - 14/May/08 11:00 AM
Status Resolved [ 5 ] Closed [ 6 ]
Dongsheng Cai made changes - 14/May/08 11:19 AM
QA Assignee mina dongsheng
Nicolas Martignoni made changes - 12/Aug/08 02:21 AM
Resolution Fixed [ 1 ]
Status Closed [ 6 ] Reopened [ 4 ]
Fix Version/s 1.9.1 [ 10240 ]
Nicolas Martignoni made changes - 12/Aug/08 02:22 AM
Affects Version/s 1.9.2 [ 10280 ]
Affects Version/s 1.7.4 [ 10243 ]
Affects Version/s 1.8.4 [ 10242 ]
Affects Version/s 1.9 [ 10190 ]
Affects Version/s 2.0 [ 10122 ]
Nicolas Martignoni made changes - 02/Nov/08 05:25 AM
Link This issue has a non-specific relationship to MDL-16996 [ MDL-16996 ]
Nicolas Martignoni made changes - 02/Nov/08 08:29 PM
Link This issue has a non-specific relationship to MDL-6688 [ MDL-6688 ]
Nicolas Martignoni made changes - 22/Nov/08 07:56 AM
Affects Version/s 1.9.2 [ 10280 ]
Affects Version/s 2.0 [ 10122 ]
Affects Version/s 1.9.3 [ 10290 ]
Description HTML entity   don't get parsed correctly by function p() and print litteraly, e.g. $string['usergroupmembership'] in group/members.php, line 281.

If I interpret correctly the code of p() and s(), the & entity is correctly parsed. Suggesting adding   to the preg_replace call.
HTML entities like   or   don't get parsed by function p() and print litteraly, e.g. $string['usergroupmembership'] in group/members.php, line 281.