Ondersteuning » Code oplossingen gezocht » [Plugin: Front-end Editor]

  • I am using the excellent plugins RomeLuv Google Maps for WordPress and Front-end Editor.
    When I activate Front-end Editor, the google maps don’t show anymore, when a user has the ability to edit the post or page.

    Any suggestions on how to fix this?

1 reactie aan het bekijken (van in totaal 1)
  • Thread starter ruudbass

    (@ruudbass)

    • http://scribu.net/
    • helped me out

      The problem is that the Romeluv plugin doesn’t properly escape the post title.

      In romeluv-maps.php, replace this line:

      infowindow.setContent("<p><span class=\'romeluv-google-map-link\' >'.get_the_title().'</span> ';

      with this:

      infowindow.setContent("<p><span class=\'romeluv-google-map-link\'  >'. esc_js( strip_tags( get_the_title() ) ).'</span>  ';

      and replace this line

      infowindow.setContent("<p style=\'width:95%\'><a class=\'romeluv-google-map-link\' href=\''.get_permalink($post->ID).'\'><b>'.get_the_title().'</b></a><br /> ';

      with this

      infowindow.setContent("<p style=\'width:95%\'><a class=\'romeluv-google-map-link\' href=\''.get_permalink($post->ID).'\'><b>'. esc_js( strip_tags( get_the_title() ) ).'</b></a><br /> ';

      Notice the additional esc_js() call and strip_tags for displaying the title properly in the infoscreens of the maps

1 reactie aan het bekijken (van in totaal 1)
  • Het onderwerp ‘[Plugin: Front-end Editor]’ is gesloten voor nieuwe reacties.