?
avatar blaue-mango
blaue-mango
25 Sep 2017

Steps to reproduce the issue

Create a menu item and under the second tab enter a title with "<".
Save the menu item.
"<" isn't saved.

Even further: If you enter " < something > " (without spaces) the whole string isn't saved.

Expected result

Title field is not empty

Actual result

Title field is empty

System information (as much as possible)

SunOS localhost 5.10 Generic_150401-49 i86pc

SQL
5.6.37-log
latin1_german1_ci
utf8mb4_general_ci

PHP
7.0.22

Webserver Strato
Apache/2.2.31 (Unix)
cgi-fcgi

Joomla! 3.8.0 Stable [ Amani ] 19-September-2017 14:00 GMT
Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT

Browser
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36

Additional comments

avatar blaue-mango blaue-mango - open - 25 Sep 2017
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 Sep 2017
avatar blaue-mango
blaue-mango - comment - 25 Sep 2017

Even here the string " < something > " (without spaces) is missing.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18104.

avatar blaue-mango blaue-mango - change - 25 Sep 2017
The description was changed
Title
" gets trimmed out in Title of Menu Items
" gets trimmed out in Title of Menu Items
avatar blaue-mango blaue-mango - edited - 25 Sep 2017
avatar blaue-mango blaue-mango - edited - 25 Sep 2017
avatar blaue-mango blaue-mango - change - 25 Sep 2017
Title
gets trimmed out in Title of Menu Items
gets trimmed out in Title of Menu Items
avatar blaue-mango blaue-mango - edited - 25 Sep 2017
avatar blaue-mango blaue-mango - edited - 25 Sep 2017
avatar blaue-mango blaue-mango - change - 25 Sep 2017
Title
gets trimmed out in Title of Menu Items
Comparison character gets trimmed out in Title of Menu Items
avatar blaue-mango blaue-mango - edited - 25 Sep 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 26 Sep 2017
Status New Confirmed
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 26 Sep 2017

Status set on Issue Tracker on "Confirmed".


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18104.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 26 Sep 2017

Status set on Issue Tracker on "Confirmed".


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18104.

avatar brianteeman
brianteeman - comment - 27 Sep 2017

did you try using the html entity for that character? I am pretty sure that the html spec for the title attribute doesnt allow special characters and you have to use the escaped html entity (but i could be wrong)

avatar franz-wohlkoenig franz-wohlkoenig - change - 28 Sep 2017
Status Confirmed Information Required
avatar blaue-mango
blaue-mango - comment - 28 Sep 2017

I did try that indeed.

&lt;
<
<something>
\<
\&lt;

All of them don't work. Seems like they just get replaced by nothingness.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18104.

avatar infograf768
infograf768 - comment - 29 Sep 2017

This is weird.
We can save single and double quotes, for the menu title and also for a class (one can get class="breadcrumb &quot;myclass&quot;" when saving in the text class field "myclass".

Somewhere in code, < and > are forbidden in the table params whether straight or as htmlentities.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18104.

avatar Fedik
Fedik - comment - 29 Sep 2017

it is expected behavior,
there is default filter string for field menu-anchor_title,

and, I am not sure we should allow raw < > in that field.

avatar brianteeman
brianteeman - comment - 29 Sep 2017

it would not be raw when output as it is converted to entities there

avatar infograf768
infograf768 - comment - 1 Oct 2017

there is default filter string for field menu-anchor_title

Indeed in the text type we have $value = (string) $value;
I could not find on the net why < and > in a string kill the string.

avatar infograf768
infograf768 - comment - 1 Oct 2017

It will act the same when entering a Note in the module

avatar Fedik
Fedik - comment - 1 Oct 2017

Indeed in the text type we have $value = (string) $value;

nope, not that easy ?
if the field does not have a defined filter attribute, then an input filter will fallback to default, see
and there default clean type is "string", see

It is default behavior for all fields, without defined filter="blabla" attribute

avatar infograf768
infograf768 - comment - 2 Oct 2017

Got it.

Then, for example, would it be sensible to add filter="raw" for the Module Note (and other similar fields)?
i.e. get

<field 
			name="note" 
			type="text"
			label="COM_MODULES_FIELD_NOTE_LABEL"
			description="COM_MODULES_FIELD_NOTE_DESC"
			filter="raw"
			maxlength="255"
			size="40"
			class="span12"
		/>

and, for the menu-anchor_title, as it passes through htmlspecialchars, do we need to let string as default?

Concerning class fields, shall we use filter="cmd"?

and definitely for the cachetime fields add filter="int" ?

avatar Fedik
Fedik - comment - 2 Oct 2017

filter="raw"

no, never do that ?

class fields, shall we use filter="cmd"

class fields can have multiple value eg "class1 class2", and use of cmd will break it,

avatar brianteeman
brianteeman - comment - 4 Oct 2017

filter = raw would open this up to xss

i think this is one of those cases where sensible security settings prevent the ability for some users to do what they want and there is nthing we can do

avatar blaue-mango
blaue-mango - comment - 5 Oct 2017

i think this is one of those cases where sensible security settings prevent the ability for some users to do what they want and there is nthing we can do

Too bad. I hoped for a solution, because I'm currently needing this in a project I'm working on.
Does anyone know of an alternative/foreign character that looks the same?

avatar infograf768
infograf768 - comment - 5 Oct 2017

The nearest available in almost all fonts will be the

« »

&laquo; &raquo;

avatar brianteeman brianteeman - change - 5 Oct 2017
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2017-10-05 09:03:22
Closed_By brianteeman
avatar brianteeman brianteeman - close - 5 Oct 2017
avatar brianteeman
brianteeman - comment - 5 Oct 2017

I am going to close this as there is no change in the code that is possible and the suggestion of @infograf768 works

Add a Comment

Login with GitHub to post a comment