Download & Extend

Link field in view using "Title, as link" formatter outputs "'" in place of apostrophe

Project:Views
Version:7.x-3.3
Component:Miscellaneous
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

If a link field is included in a view and uses the "Title, as link" formatter, apostrophes in the title are output encoded ('). A workaround is to hide the link field from display, use the "URL, as pain text" formatter, add the Title field, and rewrite it as a link with the token from the link field.

Patch in #1373588: Use decode_entities() instead of html_entity_decode() does not resolve this issue.

Comments

#1

Status:active» postponed (maintainer needs more info)

Manually testing this worked fine on the current 7.x-3.x-dev version, see screenshot
so maybe provide additional information so people can reproduce your issue.

Maybe this is already fixed with 7.x-3.x-dev for you as well.

AttachmentSizeStatusTest resultOperations
title.png6.71 KBIgnored: Check issue status.NoneNone

#2

Status:postponed (maintainer needs more info)» active

The issue is with apostrophes in the title field. The example you give has an apostrophe in the content.

EDIT: Sorry. I misunderstood your screenshot. I see now that it is the section of the edit view page and not the edit node page.

#3

Status:active» postponed (maintainer needs more info)

I just print out the title.

#4

Status:postponed (maintainer needs more info)» active

Here is a screencap of the view we had trouble with. We have "news" nodes that have a link field. We have a view that displays the news nodes, and one of the fields it displays is the link field. We have the link field set to "Title, as link". If the title of the node contains an apostrophe, it is converted to "'". I just retested with the latest 7.x-3.x-dev and verified that it is still a problem.

AttachmentSizeStatusTest resultOperations
link.png136.07 KBIgnored: Check issue status.NoneNone

#5

This is the l function which is doing that.

You've to use

<?php
array("html" => TRUE)
?>
in l attributes argument to avoid it.

#6

Im having the same issue, but its not with a link, but just the title itself.

--

Edit finally, it wasnt views related. I was using a token for my node, and it needed to be full html rather than plain text.

#7

I'm getting this from the title of the view I created. I'll just clone it to remove it but it was annoying. Showed up with the HTMLEntities in blocks and other places making it look bad.

To replicate just clone a view and entitle it "Mike's View". It's not dangerous, but it is ugly.

#8

Version:7.x-3.x-dev» 7.x-3.3

I have been experiencing similar issues with Views 7.x-3.3. I have a view that is filtering nodes based on a taxonomy term. In that page layout, I have chosen to override the page title with my context argument "%1" which refers to the "taxonomy term with depth" context.
When a taxonomy term has a single quote ', such as "Mom's Day Out", it's displayed as "Mom&#039s Day Out" instead. Also, when the title includes the "&" character is showing up as &Amp; instead. Is there a quick fix to this or am I configuring my view incorrectly ?

#9

@tahiticlic

Can this be done using the UI?

#10

I guess no.