Problem/Motivation

Right now it is not possible to use this module in a href attribute of a link, as it breaks the html.

My proposal is to be able to use both " and ' as enclosure.

Comments

facine created an issue. See original summary.

facine’s picture

StatusFileSize
new1.88 KB
facine’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: 3380978-2.patch, failed testing. View results

facine’s picture

Status: Needs work » Needs review
StatusFileSize
new1.9 KB
pianomansam’s picture

Status: Needs review » Needs work

@facine I think adding this feature is great. As it is currently written, though, it looks like there's nothing that forces the content to use the same type of quote character; a double quote could be first and a single quote second.

pianomansam’s picture

@facine can you also provide an example of how this affects you? The token replacement will also replace the double quotes, so it's unclear to me how this is an actual issue.

facine’s picture

Status: Needs work » Needs review
StatusFileSize
new2.5 KB

@pianomansam, I am attaching a new patch applying the suggested changes.

An example would be:

<a href="mailto:[current-user:mail|'email@example.com']">
pianomansam’s picture

@facine, thanks for the updated patch. I'll review it.

Also, thanks for the scenario where this could be an issue. Is this particular one breaking something for you? Whether you use <a href="mailto:[current-user:mail|'email@example.com']"> or <a href="mailto:[current-user:mail|"email@example.com"]">, the resulting HTML will identical and valid:

<a href="mailto:email@example.com">

facine’s picture

I have issues with: <a href="mailto:[current-user:mail|"email@example.com"]">, this is the result: <a href="mailto:[current-user:mail|" email=""> because the double quote is closing the href attribute.

pianomansam’s picture

@facine Hmm, can you provide a bit more context? Is a text format involved? Any particular modules or contexts where this is happening?

facine’s picture

@pianomansam, using a full html text format and the token filter module.

pianomansam’s picture

I was wondering if it was the token filter module. What's the order of filters? Is the token filter first?

pianomansam’s picture

Status: Needs review » Postponed (maintainer needs more info)
evamtinez’s picture

StatusFileSize
new1.88 KB

Hi,

I've attached an updated patch for version 2.3.2, replacing the one from #5.