I needed a way to remove up html from my input from the users. This is my first attempt at it.(function ($) { $.fn.safeVal = function () { var value = $(this).val(); var ret = $('<div>').html(value).text(); return ret; }; })(jQuery);
I needed a way to remove up html from my input from the users. This is my first attempt at it.
(function ($) { $.fn.safeVal = function () { var value = $(this).val(); var ret = $('<div>').html(value).text(); return ret; }; })(jQuery);
Post a Comment
No comments:
Post a Comment