I can enter a team name with an apostrophe and it views fine everywhere except in the Schedule table and the Team filter drop-down for the schedule. When I do, the apostrophe is replaced with &#039 on the schedule. I created a game with a league and location that have an apostrophe and they appear fine in the Schedule table.

If I go to the Content Types and Manage the fields for the Teams type, the Short name field was set to plain text. When I changed it to Filtered text, it shows the apostrophe, but now has paragraph tags around the team name like <p>Starr's Mill</p> including the ones without an apostrophe in the short name (they were fine before). The Team filter drop-down still shows the hex code for the apostrophe.

I added teams with an apostrophe in the name to the Opponents, but they work fine as well. I then added a URL for the Opponent team, and it now has the paragraph tags around the name in the schedule. This has the same effect if I add a URL to an Opponent that does not have an apostrophe.

I cannot find what formats the URL. It looks like a function named 'l' (lower-case L). I do not know where this is to see what is causing the paragraph tags.

Comments

Fintheb’s picture

I was able to fix the team name in the schedule by eliminating the use of the l() function for displaying the name when it has an URL. I changed line 573 of the sport_game.module file to

    $output .= '<a href='.$url.'>'.$element['#item']['safe'].'</a>';

from

    $output .= l($element['#item']['safe'], $url);

I am still getting the escape code version in the drop-down selector for the team views.

rötzi’s picture

Status: Active » Fixed

Thanks for reporting. Fixed in CVS and next dev release.

Status: Fixed » Closed (fixed)

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