Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8328985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:37:09+00:00 2026-06-09T01:37:09+00:00

var json = { Item: { Items: { Body: <SPAN style=\LINE-HEIGHT: 115%; FONT-FAMILY: ‘Arial’,’sans-serif’;

  • 0
var json = {
    "Item": {
        "Items": {
         "Body": "<SPAN style=\"LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 11pt; mso-fareast-font-family: Calibri; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA\">\"We have all been inoculated with Christianity, and are never likely to take it seriously now! You put some of the virus of some dreadful illness into a man's arm, and there is a little itchiness, some scratchiness, a slight discomfort, disagreeable, no doubt, but not the fever of the real disease, the turning and the tossing, and the ebbing strength. And we have all been inoculated with Christianity, more or less. We are on Christ's side, we wish him well, we hope that He will win, and we are even prepared to do something for Him, provided, of course, that He is reasonable, and does not make too much of an upset among our cozy comforts and our customary ways. But there is not the passion of zeal, and the burning enthusiasm, and the eagerness of self-sacrifice, of the real faith that changes character and wins the world.\"<B>A.J. Gossip<\/B><\/SPAN>",
        },

    }
};
var someString = json.Item.Body.replace(/<br\s*\/?\s*>/g,"\n");   
alert(someString);
​

I am getting HTML tags in my response, which i should remove or parse it. How can i go about this. I did for BR tags, but now it seems there are other tags too coming in.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T01:37:10+00:00Added an answer on June 9, 2026 at 1:37 am

    I think all you need is a simple regex to strip html style tags from the content. Try this.

    str.replace(/<\/?[^>]+>/gi, '')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

HTML: <div id=twitter style=float:left;> <span></span> </div> jQuery: var obj = JSON.parse(data); $.each(obj.items, function(i, item)
var list = []; $.getJSON(json.js, function(data) { $.each(data, function(i, item) { console.log(item.text); list.push(item.text); });
Given the following array of json objects: var items = [ {id:1, parentId:0, name:'item1'},
I have this json var from google api : $json=' { kind: webfonts#webfontList, items:
Im trying to get a list of line items to a webpage using JSON,
var json_string=$.parseJSON(document.getElementById(json_db).innerHTML); $(function () { $(#folder_tree).jstree({ contextmenu: {items: customMenu}, json_data : {data:json_string}, plugins :
Hi I have this code to parse JSON on JQUERY var json_text2 = $.parseJSON('{data:[[1340650436,2.00000],[1340736844,4.00000]],label:Waist
i have this JSON: var projects_array = new Array( {name:myName1, id:myid1, index:1}, {name:myName2, id:myid2,
Using this to load the json var jsonParsed = JSON.parse(localStorage.getItem('test')); Using this to save
I produce an int from JSON data var f_page = [TheHouseofMarley]; retrieveData(f_page[0]); function retrieveData(teamName)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.