You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cleanHtml logic is not clear and it seem like it has a lot of unrelated logic.
I couldn't find any documentation for it (probably because the original function was very simple)
Original method just returned a string removing some redundant html tags and white spaces -
If I understand correctly #4 the code should remove the pre element from the content (not sure why it's needed but it does not seem to revert the instance back once it's done)
And after it we have this code which is used to inject image data in as new form inputs
// Strip the images with src="data:image/.." out;if(o===true&&$(self).parent().is("form")){vargGal=$(self).html;if($(gGal).has("img").length){vargImages=$("img",$(gGal));vargResults=[];vargEditor=$(self).parent();$.each(gImages,function(i,v){if($(v).attr("src").match(/^data:image\/.*$/)){gResults.push(gImages[i]);$(gEditor).prepend("<input value='"+$(v).attr("src")+"' type='hidden' name='postedimage/"+i+"' />");$(v).attr("src","postedimage/"+i);}});}}
(I think implementation is a bit buggy since it never actually call the $( self ).html method but I haven't really ran the code to check).
But even if it works correctly it doesn't seem like it has anything to do with the actual clean functionality and it's probably should be included in a unique method (maybe even with a complementary logic which will allow to also remove the inputs that were created).
currently on v2 it also not being exposed at all and it seem to still assume this refers to the wysiwyg instance ( there is a pull request which exposes it but doesn't address any of the other issues)
The text was updated successfully, but these errors were encountered:
cleanHtml logic is not clear and it seem like it has a lot of unrelated logic.
I couldn't find any documentation for it (probably because the original function was very simple)
Original method just returned a string removing some redundant html tags and white spaces -
Now it seem like it has a lot of extra logic was added in
If I understand correctly #4 the code should remove the pre element from the content (not sure why it's needed but it does not seem to revert the instance back once it's done)
And after it we have this code which is used to inject image data in as new form inputs
(I think implementation is a bit buggy since it never actually call the
$( self ).html
method but I haven't really ran the code to check).But even if it works correctly it doesn't seem like it has anything to do with the actual clean functionality and it's probably should be included in a unique method (maybe even with a complementary logic which will allow to also remove the inputs that were created).
currently on v2 it also not being exposed at all and it seem to still assume
this
refers to thewysiwyg
instance ( there is a pull request which exposes it but doesn't address any of the other issues)The text was updated successfully, but these errors were encountered: