Jump to content

Filtering html with jQuery/JS


Go to solution Solved by KubeR,

Recommended Posts

Hi,

I want to create a cancel button which replaces back the text that was after clicking the "cancel" button.

But the problem is,that the tags does not take affect when I use .html() to restore the previous content with all the tags that it had,they show as plain text.

I searched for alternative function or way,but didn't find any.

 

So,my question is : is there any command that can filter the html and make the tags work properly with all the attributes they contain ?

 

 

 

 

 

Before the hand,

thank you,

KubeR.

Edited by KubeR
Link to comment
https://forums.phpfreaks.com/topic/282261-filtering-html-with-jqueryjs/
Share on other sites

  • Solution

Okay the problem is fixed,the solution was very simple actually,all I had to do is instead of using .html to excute the text from the textarea is use .val

haven't realized it because it was between the tags and not in the "value" attribute.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.