Skip to content

Instantly share code, notes, and snippets.

@ciarancolgan
Last active July 25, 2017 12:32
Show Gist options
  • Save ciarancolgan/f9e6543ada52f8be290539b93e57c7b6 to your computer and use it in GitHub Desktop.
Save ciarancolgan/f9e6543ada52f8be290539b93e57c7b6 to your computer and use it in GitHub Desktop.
Handle if Footable column is marked as HTML but doesn't contain HTML markup and value contains special chars
parser: function (valueOrElement) {
if (F.is.string(valueOrElement)) {
// UPDATE HERE: Added a check to see if the element is marked as html, but isnt actually a HTML tag. If so, add a span tag around it.
if (!valueOrElement.startsWith('<')) {
valueOrElement = "<span>" + valueOrElement + "</span>";
}
valueOrElement = $($.trim(valueOrElement));
}
.............
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment