Author Topic: Easy Review Builder - Quotation marks in attributes  (Read 5812 times)

gurks

  • Tadpole
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Easy Review Builder - Quotation marks in attributes
« on: April 04, 2011, 07:57:40 AM »
First of all I would like to honor the Easy Review Builder. With the help of this plugin it's really easy to create a nice review table.

But there is a problem with this plugin I always wonder about: How do I correctly deal with quotation marks in attributes. Sometimes I would like to add links in the category detail text. That works fine if I use ' instead of " for the html code (a tag). But lately I wanted to add a link to wikipedia and that did not even work with ' (could not figure out what's the problem with this link).

I then had a look into the code of the plugin and found out that it's because of the wordpress shortcode syntax that links are difficult to add. There is no escape sequence for the quotation mark.

Does anybody else have this requirment? Is there a workaround I could use for my problem?

doug@dyerware.com

  • Administrator
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: +15/-0
    • View Profile
    • Email
Re: Easy Review Builder - Quotation marks in attributes
« Reply #1 on: April 04, 2011, 11:46:37 AM »
Could you post a shortcode of what you are trying to do?  Pretty sure I understand but it's always helpful to have the real thing

gurks

  • Tadpole
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Easy Review Builder - Quotation marks in attributes
« Reply #2 on: April 04, 2011, 03:10:27 PM »
Sorry, my mistake.

My shortcode looks like this:

Code: [Select]
[easyreview title="MyTitle" cat1title="MyCategory" cat1detail="This is the <a href='http://en.wikipedia.org/wiki/Detail' target='_blank'>detail</a>" cat1rating="5" tablecss="easyReviewWrapper"]
It would be nice if it could look like this (escape sequence for quotation marks):

Code: [Select]
[easyreview title="MyTitle" cat1title="MyCategory" cat1detail="This is the <a href=\"http://en.wikipedia.org/wiki/Detail\" target=\"_blank\">detail</a>" cat1rating="5" tablecss="easyReviewWrapper"]
As the missing escape sequences for shortcode is not the fault of the Easy Review Builder plugin I hoped to find a suitable workaround here.
« Last Edit: April 04, 2011, 03:50:18 PM by gurks »

doug@dyerware.com

  • Administrator
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: +15/-0
    • View Profile
    • Email
Re: Easy Review Builder - Quotation marks in attributes
« Reply #3 on: April 08, 2011, 01:33:48 AM »
Ah yes this issue :)

Here you go.  Just use the HTML escape code for quotes.  It worked for me with your shortcode.  Note I just replace every slashquote as such:

Code: [Select]
[easyreview title="MyTitle" cat1title="MyCategory" cat1detail="This is the <a href=&quot;http://en.wikipedia.org/wiki/Detail&quot; target=&quot;_blank&quot;>detail</a>" cat1rating="5" tablecss="easyReviewWrapper"]
the end result is a link that took me to wikipedia for 'detail'.

doug@dyerware.com

  • Administrator
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: +15/-0
    • View Profile
    • Email
Re: Easy Review Builder - Quotation marks in attributes
« Reply #4 on: April 08, 2011, 01:35:25 AM »
Oh I see you already knew how to escape it.. you just wanted to use slashquotes.  Sorry not sure there is a convenient way for me to do that as the shortcode parser is hiccuping before it gets to me.

 

anything