Support » Plugin: WP-Filebase Download Manager » how to disable clearing HTML tags in file-template

  • Resolved Mariusz Szatkowski

    (@motylanogha)


    Hi,
    When I add html tags in a template (/wp-admin/admin.php?page=wpfilebase_sets) like:<a onClick="_gaq.push(['_trackEvent', 'download-%file_extension%', '%file_extension%', 'id%uid% - %file_extension% - %file_display_name% - %file_name% - %file_category% - %file_post_url%']);" href="%file_url%" target="_blank" title="download %file_display_name%" rel="download" ><img align="middle" src="%file_icon_url%" alt="%file_display_name%" /></a></div>

    the above is been cleared in the frontend.

    Is there any goal for that?
    How to disable this?

    Thanks.

    https://wordpress.org/plugins/wp-filebase/

Viewing 1 replies (of 1 total)
  • Thread Starter Mariusz Szatkowski

    (@motylanogha)

    I still have no idea why onclicks are disabled but I found a solution:

    – just edit /wp-content/plugins/wp-filebase/classes/TplLib.php and comment line 15:

    //$tpl = preg_replace(array('/<a\s+([^>]*)onclick=".+?"\s+([^>]*)href="%file_url%"/i', '/<a\s+([^>]*)href="%file_url%"\s+([^>]*)onclick=".+?"/i'), '<a href="%file_url%" $1$2', $tpl);

Viewing 1 replies (of 1 total)
  • The topic ‘how to disable clearing HTML tags in file-template’ is closed to new replies.