<!-- 
RSS generated by JIRA (9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b) at Mon Feb 12 03:27:35 CET 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Magnolia - Issue tracker</title>
    <link>https://jira.magnolia-cms.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-uk</language>    <build-info>
        <version>9.4.2</version>
        <build-number>940002</build-number>
        <build-date>19-01-2023</build-date>
    </build-info>


<item>
            <title>[MAGNOLIA-1506] ids and names used for HTML elements and JavaScript variables and functions</title>
                <link>https://jira.magnolia-cms.com/browse/MAGNOLIA-1506</link>
                <project id="10000" key="MAGNOLIA">Magnolia</project>
                    <description></description>
                <environment></environment>
        <key id="12765">MAGNOLIA-1506</key>
            <summary>ids and names used for HTML elements and JavaScript variables and functions</summary>
                <type id="5" iconUrl="https://jira.magnolia-cms.com/secure/viewavatar?size=xsmall&amp;avatarId=10896&amp;avatarType=issuetype">Sub-task</type>
                            <parent id="12456">MAGNOLIA-1364</parent>
                                    <priority id="3" iconUrl="https://jira.magnolia-cms.com/images/icons/priorities/major.svg">Major</priority>
                        <status id="6" iconUrl="https://jira.magnolia-cms.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="8">Outdated</resolution>
                                        <assignee username="olli">Oliver Lietz</assignee>
                                    <reporter username="olli">Oliver Lietz</reporter>
                        <labels>
                    </labels>
                <created>Thu, 3 May 2007 22:43:16 +0200</created>
                <updated>Thu, 11 Mar 2010 18:25:03 +0100</updated>
                            <resolved>Thu, 11 Mar 2010 18:25:03 +0100</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="13952" author="olli" created="Thu, 3 May 2007 23:05:15 +0200"  >&lt;p&gt;The controlType name is used to generate names and ids for HTML and JavaScript. When using custom node types and namespaces, the prefix is separated by a colon from the node/property name (e.g. jcr:mimeType). This leads to illegal names/ids.&lt;/p&gt;

&lt;p&gt;broken:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;multiselect control&lt;/li&gt;
&lt;/ul&gt;

</comment>
                            <comment id="14225" author="olli" created="Fri, 15 Jun 2007 18:58:36 +0200"  >&lt;p&gt;(from dev-list@)&lt;br/&gt;
The sanitize function from StringUtils&lt;span class=&quot;error&quot;&gt;&amp;#91;SU&amp;#93;&lt;/span&gt; fixes most of the problems replacing &lt;br/&gt;
illegal characters with an underscore and prefixing the name with mgnl_ (when &lt;br/&gt;
it doesn&apos;t start already with mgnl, see comment in StringUtils).&lt;/p&gt;

&lt;p&gt;This method is not 100% save. Think we have similar property names:&lt;br/&gt;
pr&#214;perty and pr&#220;perty*, both result in mgnl_pr_perty. It might be a rare case &lt;br/&gt;
but I don&apos;t want to rely on it. It will break sooner or later.&lt;/p&gt;

&lt;p&gt;&lt;img class=&quot;emoticon&quot; src=&quot;https://jira.magnolia-cms.com/images/icons/emoticons/star_yellow.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; I know the gui prevents entering/saving special chars. But what&apos;s about &lt;br/&gt;
import/export or exchange with other (content management) systems?&lt;/p&gt;

&lt;p&gt;A better solution would be to hex-encode the names. It&apos;s saver but leads to &lt;br/&gt;
unreadable names which makes it harder to debug.&lt;br/&gt;
We could swap implementations of sanitize when debugging - not optimal because &lt;br/&gt;
we also slightly change the system behaviour (another potential cause for &lt;br/&gt;
bugs).&lt;/p&gt;

&lt;p&gt;I have to review the JS and check if they make use of the property name to &lt;br/&gt;
construct the id/names of HTML elements for accessing them.&lt;br/&gt;
If it&apos;s the case, sanitize has also to be implemented in JS.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;SU&amp;#93;&lt;/span&gt; &lt;a href=&quot;http://svn.magnolia.info/view/magnolia/branches/custom-experimental/magnolia-core/src/main/java/info/magnolia/util/StringUtils.java&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://svn.magnolia.info/view/magnolia/branches/custom-experimental/magnolia-core/src/main/java/info/magnolia/util/StringUtils.java&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="14226" author="olli" created="Fri, 15 Jun 2007 19:26:06 +0200"  >&lt;p&gt;There is indeed JS which makes use of the property name (id/name) to construct the id/names of HTML elements for accessing them. This forces us to use a bi-directional en-/decoding of the ids/names.&lt;/p&gt;

&lt;p&gt;hexencoding/hexdecoding looks best for that purpose.&lt;/p&gt;

&lt;p&gt;HTML:&lt;/p&gt;

&lt;p&gt;use StringUtils.hexencode(string) for ids and names&lt;/p&gt;

&lt;p&gt;JS:&lt;/p&gt;

&lt;p&gt;use StringUtils.hexencode(string) when constructing function names or paramter values when they are (final) HTML ids/names&lt;/p&gt;

&lt;p&gt;DON&apos;T use hexencode for parameter values in JS functions when it&apos;s the pure id/name, the JS has to encode the id/name itself when it&apos;s used for accessing HTML elements&lt;/p&gt;
</comment>
                            <comment id="14254" author="pbracher" created="Fri, 22 Jun 2007 09:09:04 +0200"  >&lt;p&gt;I don&apos;t like this hexencoding of former readable strings.&lt;/p&gt;

&lt;p&gt;What is about to url encode the srtings (only special characters are encoded)?&lt;/p&gt;</comment>
                            <comment id="14256" author="olli" created="Fri, 22 Jun 2007 21:12:04 +0200"  >&lt;p&gt;&amp;gt; What is about to url encode the srtings (only special characters are encoded)?&lt;/p&gt;

&lt;p&gt;Doesn&apos;t work for several reasons:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;not all characters which are illegal as id/name are encoded&lt;/li&gt;
	&lt;li&gt;encoding works only for ASCII characters (or hex/url results are of different length, 2 or 4 digits)&lt;/li&gt;
	&lt;li&gt;encoding is done in hex prefixed with a % (percent sign), which is illegal as id/name character&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;There are lots of cases where ids/names are prefixed or suffixed, e.g. btn_ or _fileNameExtension - only the id/name should be encoded and the prefix/suffix should be let as is.&lt;/p&gt;
</comment>
                            <comment id="14257" author="olli" created="Sat, 23 Jun 2007 14:50:07 +0200"  >&lt;p&gt;make it more consistent and separate all prefixes and suffixes from id/name with _ (underscore)&lt;/p&gt;</comment>
                            <comment id="14258" author="olli" created="Sat, 23 Jun 2007 15:08:02 +0200"  >&lt;p&gt;we can use the universal title attribute for human readable (unencoded) names&lt;/p&gt;</comment>
                            <comment id="14268" author="olli" created="Mon, 25 Jun 2007 23:01:00 +0200"  >&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;review use of id and name&lt;/li&gt;
	&lt;li&gt;create id/name prefix and suffix variables and setters/getters&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;a href=&quot;http://www.theajaxworkshop.com/index.php/Element_Name_vs_Id&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.theajaxworkshop.com/index.php/Element_Name_vs_Id&lt;/a&gt;&lt;/p&gt;
</comment>
                            <comment id="14305" author="olli" created="Sun, 1 Jul 2007 15:02:48 +0200"  >&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;replace getElementById with getElementsByName when used for grouped elements (e.g. button sets)&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="14342" author="olli" created="Thu, 12 Jul 2007 10:40:19 +0200"  >&lt;p&gt;&amp;gt; - replace getElementById with getElementsByName when used for grouped elements (e.g. button sets)&lt;/p&gt;

&lt;p&gt;reviewed: name attribute is deprecated, see &lt;a href=&quot;https://jira.magnolia-cms.com/browse/MAGNOLIA-1620&quot; title=&quot;Button/ButtonSet: don&amp;#39;t rely on _SETBUTTON_ for toggling buttons of same set&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MAGNOLIA-1620&quot;&gt;&lt;del&gt;MAGNOLIA-1620&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="14414" author="olli" created="Wed, 1 Aug 2007 20:18:34 +0200"  >&lt;p&gt;&amp;gt; There are lots of cases where ids/names are prefixed or suffixed, e.g. btn_ or _fileNameExtension - only the id/name should be&lt;br/&gt;
&amp;gt; encoded and the prefix/suffix should be let as is. &lt;/p&gt;

&lt;p&gt;makes encoding/decoding to complex, hence complete id has to be encoded&lt;/p&gt;

&lt;p&gt;&amp;gt; we can use the universal title attribute for human readable (unencoded) names &lt;/p&gt;

&lt;p&gt;ugly hack and normally human readable id is not needed&lt;/p&gt;
</comment>
                            <comment id="27081" author="gjoseph" created="Thu, 11 Mar 2010 18:04:40 +0100"  >&lt;p&gt;the &quot;&lt;tt&gt;custom-experimental&lt;/tt&gt;&quot; branch referred to in this issue was moved to &lt;a href=&quot;http://svn.magnolia-cms.com/svn/community/graveyard/namespace-and-cnd-support-experiment/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://svn.magnolia-cms.com/svn/community/graveyard/namespace-and-cnd-support-experiment/&lt;/a&gt;&lt;br/&gt;
(a relevant name to start with, and since the branch is inactive, it&apos;s now considered &quot;dead&quot;, hence the new location)&lt;/p&gt;</comment>
                            <comment id="27087" author="gjoseph" created="Thu, 11 Mar 2010 18:24:30 +0100"  >&lt;p&gt;The work in this branch is outdated; with 5.0, this issue will not be present and/or be fixed in a different way.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10111" key="com.atlassian.jira.toolkit:reporterdomain">
                        <customfieldname>Company</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>oliverlietz.de</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10031" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of First Response</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 22 Jun 2007 09:09:04 +0200</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_12730" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_14151" key="com.atlassian.jira.toolkit:message">
                        <customfieldname>Docu info</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10061" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comm is not jira-dev</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10071" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last participant</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ajones</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_13136" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            13 years, 50 weeks, 3 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10020" key="com.atlassian.jira.toolkit:attachments">
                        <customfieldname>Number of attachments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10150" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname>Number of comments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>13.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>gjoseph</customfieldvalue>
            <customfieldvalue>olli</customfieldvalue>
            <customfieldvalue>pbracher</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10833" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i02fov:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10244" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>14280</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_14145" key="com.intenso.jira.issue-templates:issue-templates-customfield">
                        <customfieldname>Template</customfieldname>
                        <customfieldvalues>
                            


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_15131" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Time in Discovery</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time in Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>