Page 1 of 1
[SOLVED] News module: HTML-tags in URL
Posted: Tue Jun 10, 2008 1:34 pm
by nils73
Hi,
I just installed 1.3 and found something strange: When I enter an HTML-tag inside the title, for example
Code: Select all
<acronym title="United Nations Organization">UNO</acronym> is cool
and then click on the detail-link of the news I get something like this
index.php/news/17/25/acronym-title-United-Nations-Organization-acronym-is-cool
Is there any way to avoid this? Maybe stripping tags before parsing it?
Regards,
Nils
Re: News module: HTML-tags in URL
Posted: Tue Jun 10, 2008 1:41 pm
by calguy1000
That'd be the only way to handle that, and it'd have to be done in numerous places in the code. Unfortunately.
My only suggestion would at this point would bbe not to use html tags in the title field.
Create another custom field for your acronym, and then modify your template(s) accordingly.
Re: News module: HTML-tags in URL
Posted: Tue Jun 10, 2008 2:01 pm
by nils73
calguy1000 wrote:
That'd be the only way to handle that, and it'd have to be done in numerous places in the code.
No chance - it has to be WCAG-compliant according to law.
calguy1000 wrote:
My only suggestion would at this point would bbe not to use html tags in the title field.
Create another custom field for your acronym, and then modify your template(s) accordingly.
Not quite sure what you mean. But I try to put it in my words:
- define a custom field (i.e. headline)
- use title only without tags for url-field
- put same text into "headline"-field with tags
- use headline in templates for display with tags
Right?
Nils
Re: News module: HTML-tags in URL
Posted: Tue Jun 10, 2008 2:10 pm
by calguy1000
yeah
Re: News module: HTML-tags in URL
Posted: Tue Jun 10, 2008 3:23 pm
by nils73
Hm, might work, but I need to use {$entry->titlelink} -- or is there any other way to get only the href-value?
Re: News module: HTML-tags in URL
Posted: Tue Jun 10, 2008 4:19 pm
by nils73
Solved it. Spent some time searching the Wiki and the forum and finally stumbled upon:
http://wiki.cmsmadesimple.org/index.php ... /Templates --- might be a good idea to include all of the fields in the help some time.
So now my solution is to have a custom field with tags and the title-field without tags. Works, but very hard to understand for editors with no technical knowledge. Thanks however for the brilliant idea - you saved my live and CMSMS is still prettiest after all.
Regards,
Nils