Skip to content

Instantly share code, notes, and snippets.

@kricore
Created May 14, 2015 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kricore/7abc76e04c1bc9235ce2 to your computer and use it in GitHub Desktop.
Save kricore/7abc76e04c1bc9235ce2 to your computer and use it in GitHub Desktop.
Cleaning up K2 extrafields.
<?php
$safe = array("", "");
$nonsafe = array("'", "\"");
$custometa = $this->item->extraFields->NAME->value;
$safemeta = str_replace( $nonsafe, $safe, $custometa);
echo $safemeta; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment