Hi there,

When using the tag in a menu, this is the class that gets created:

"

CommentFileSizeAuthor
#6 nice-menus-paths-100914-6.patch1.48 KBadd1sun

Comments

add1sun’s picture

you need to escape (by using the < code > tag) any kind of code you post so folks can actually read it ;)

I looked at the problem though and it does throw a XHTML strict warning (but not error). I'll have to see what can be done to maybe strip the brackets or encode.

For those following along at home this is the output if you use <front> as the path for a menu item in a nice menu"

<li id="menu-87" class="menu-path-<front>"><a href="/">Front Page</a></li>

If fixed, it needs to be done in both 4.7 and 5

add1sun’s picture

Duplicate issued filed here: http://drupal.org/node/151549. Let's keep the discussion and any patches in this thread though.

jsherman, if you would like to learn to patch here is the handbook page http://drupal.org/patch/create and I more than willing to help teach you. It is really easy once you know it.

add1sun’s picture

Title: <front> tag get put in class, page doesn't validate » unencoded symbols in class name cause validation warning

changing name to be more generic since it isn't just the front tag that does this

add1sun’s picture

Version: 4.7.x-1.x-dev » 5.x-1.x-dev

damn, meant to change it to 5 as well

davemybes’s picture

I have posted a patch for this over here: http://drupal.org/node/176184, that replaces the < & > so that at least < front > is displayed correctly.

add1sun’s picture

Status: Active » Needs review
StatusFileSize
new1.48 KB

Here is a patch that attempts to give a relatively clean class name by stripping out a number of characters as well as http://. I think urlencode would make pretty nasty class names and doing a manual list of ugliness-stripping is better in the end. If folks could test this out and make sure it doesn't muck anything up or can think of a better method/list of chars, please report back here.

davemybes’s picture

The patch works fine for me - no odd results that I can see. Thanks. I'll let one more person respond in the positive before this can be set to RTBC.

add1sun’s picture

Status: Needs review » Fixed

Committed to HEAD and 5 dev.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.