[SOLVED] News module: HTML-tags in URL

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

[SOLVED] News module: HTML-tags in URL

Post 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
Last edited by nils73 on Tue Jun 10, 2008 4:20 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: News module: HTML-tags in URL

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

Re: News module: HTML-tags in URL

Post 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
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: News module: HTML-tags in URL

Post by calguy1000 »

yeah
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

Re: News module: HTML-tags in URL

Post by nils73 »

Hm, might work, but I need to use {$entry->titlelink} -- or is there any other way to get only the href-value?
nils73
Power Poster
Power Poster
Posts: 520
Joined: Wed Sep 08, 2004 3:32 pm

Re: News module: HTML-tags in URL

Post 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
Post Reply

Return to “CMSMS Core”