On the /admin/build/flags/edit/ page, if I use quotes in any of the description fields that are then added as part of the tag that is generated via the flag_create_link() function, the tag is output incorrectly (doesn't escape the quotes)

For example:

flag_create_link('watchlist', $nid)  --->  <a class="flag flag-action flag-link-toggle flag-processed" list="" watch="" your="" to="" 93)="" (id:="" project="" new="" my="" title="Add the project " href="/flag/flag/watchlist/93?destination=projects&token=xx">Flag</a>

Removing the quotes fixes it:

flag_create_link('watchlist', $nid) ---> <a class="flag flag-action flag-link-toggle flag-processed" title="Add the project My New Project to your watch list" href="/flag/flag/watchlist/93?destination=projects&token=xx">Flag</a>
CommentFileSizeAuthor
#4 flag_title_plain.patch1.08 KBquicksketch

Comments

Anonymous’s picture

Status: Active » Closed (fixed)
Anonymous’s picture

Status: Closed (fixed) » Active
Anonymous’s picture

Obviously that description and example is wrong, forgot it would automatically convert my links...

Here's the description, again:

On the /admin/build/flags/edit/ page, if I use quotes in any of the description fields that are then added as part of the <a> tag that is generated via the flag_create_link() function, the <a> tag is output incorrectly (doesn't escape the quotes)

For example:

flag_create_link('watchlist', $nid) ---> <a class="flag flag-action flag-link-toggle flag-processed" list="" watch="" your="" to="" project="" new="" my="" title="Add the project " href="/flag/flag/watchlist/93?destination=projects&token=xx" rel="nofollow">Flag</a>

Removing the quotes fixes it:

flag_create_link('watchlist', $nid) ---> <a class="flag flag-action flag-link-toggle flag-processed" title="Add the project My New Project to your watch list" href="/flag/flag/watchlist/93?destination=projects&token=xx" rel="nofollow">Flag</a>

quicksketch’s picture

StatusFileSize
new1.08 KB

Could you try out this patch and see if it causes any unexpected side-effects? Seems like this should do the trick.

quicksketch’s picture

Status: Active » Fixed

I committed the above patch.

Status: Fixed » Closed (fixed)

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

amishra’s picture

Component: Code » Flag core

I apploed it dint work