• Resolved barcaxi

    (@barcaxi)


    I’m trying to go to an URL when table content is clicked. But the hyperlink is being messed up.

    For example:

    [table caption="Just test table" width="500" colwidth="20|100|50" colalign="left|left|center|left|right"]
    head1
    [attr onclick="document.location.href=’http://www.google.com’"%5DGoogle
    [/table]

    The HTML output renders this:

    <td onclick=”document.location.href=’http: style=”text-align:left” >Google</td>

    When any forward slash (/) is in the URL it breaks the link.

    Thanks for any help.

    https://wordpress.org/plugins/easy-table/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author takien

    (@takien)

    Will be fixed on next update.

    If you want a quick fix. please do manual patch:
    edit easy-table.php file on the Easy Table plugin directory

    go to line 348

    replace
    preg_match('/\['.$this->option('attrtag').' ([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)/',$cell,$matchattr);

    with:
    preg_match('/\['.$this->option('attrtag').' ([^\\]]*)/',$cell,$matchattr);

    Thread Starter barcaxi

    (@barcaxi)

    Thank you 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hyperlink content’ is closed to new replies.