Last active
July 25, 2017 12:32
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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