• Hi there,

    I notice when using the Lightbox plugin, dollar signs and backslashes are truncated in image captions.

    To resolve this, I have replaced preg_replace with preg_replace_callback in the function add_custom_gallery_lightbox_selector( $content ), e.g.

    $content = str_replace( $link, preg_replace_callback( '/(?:data-rel)=(?:\'|")(.*?)(?:\'|")/', 'data-rel="' . Responsive_Lightbox()->options['settings']['selector'] . '-gallery-' . base64_encode( $result[1] ) . '"' . ( ! empty ( $title ) ? ' title="' . esc_attr( $title ) . '"' : '' ) . ( Responsive_Lightbox()->options['settings']['script'] === 'imagelightbox' ? ' data-imagelightbox="' . $id . '"' : '' ), $link ), $content );

    Was wondering if a fix can be impelemented in the plugin? Thank you.

    • This topic was modified 7 years, 2 months ago by trenzterra.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fix for captions with $ and \ being truncated’ is closed to new replies.