This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
Use this filter to prevent an apostrophe from being prepended to cells starting with a +, = or @ character to prevent Spreadsheet applications from running formulas.
Usage
add_filter( 'frm_export_view_risky_characters', 'remove_risky_characters' ); function remove_risky_characters( $characters )
Parameters
- $characters (array)
Examples
Remove risky characters
Use this code example to remove the apostrophe that appears before a '+' character when exporting a table with phone numbers.
add_filter( 'frm_export_view_risky_characters', 'remove_risky_characters' );
function remove_risky_characters( $characters ) {
return array( '=', '@' );
}
If you want to add the apostrophe for potentially risky cells but remove it before the '+' sign for phone numbers, use frm_export_content instead.