Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
9 - 2 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re: Module translation and special characters
by zyspec on 2021/12/1 16:01:11

Glad the explanation helped. In this case Cedric's change should fix this particular issue.
Re: Module translation and special characters
by alain01 on 2021/12/1 10:50:00

yes I had seen but I didn't understand Cedric's explanation in the PR.
With the additional explanation given by Zyspec, it is clear and I now understand Cedric's explanation
Re: Module translation and special characters
by Cesagonchu on 2021/12/1 10:37:48

To solve the problem, Cedric made a pull request here:
https://github.com/XOOPS/XoopsCore25/pull/1133
Re: Module translation and special characters
by alain01 on 2021/12/1 6:39:18

Thank you Zyspec for this clear explanation
Re: Module translation and special characters
by zyspec on 2021/12/1 3:41:32

The HTML 'id' has historically only allowed [A-Za-z0-9-_:.], and the string must start with [A-Za-z] and not be empty. In other words a '/', space or accented chars, etc. are not valid for an id attribute. For HTML5 the only requirement is that it can't be empty and can't contain a space.

Any code that uses a var for the HTML4 id should sanitize it first...

Maybe something like:
le="color: #000000"><?php $idAttrib = preg_replace('/^[A-Za-z]+([A-Za-z\d-_:.])*?$/', '_', $id); $idAttrib = !empty($idAttrib) ?? 'A' . (string)rand(1,32767); // create a random ID if it's currently empty


For HTML5 just make sure that it's not empty and replace any spaces with an underscore. So something as simple as:
le="color: #000000"><?php $idAttrib = str_replace(' ', '_', $id); $idAttrib = !empty($idAttrib) ?? 'A' . (string)rand(1,32767); // create a random ID if it's currently empty

Who's Online

139 user(s) are online (63 user(s) are browsing Support Forums)


Members: 0


Guests: 139


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits