Skip to content

Instantly share code, notes, and snippets.

@hborders
Created June 16, 2013 05:08
Show Gist options
  • Select an option

  • Save hborders/5790844 to your computer and use it in GitHub Desktop.

Select an option

Save hborders/5790844 to your computer and use it in GitHub Desktop.
A good comment
// if we submit more than one div with a class of "jive-rendered-context", only the first div is accepted
innerHTMLContent = innerHTMLContent.replace(/(<div class="jive-rendered-content">)/ig,"<div>");
@adkron

adkron commented Jun 16, 2013

Copy link
Copy Markdown
  function keepOnlyFirstRenderedContent(htmlContent) {
    htmlContent = htmlContent.replace(/(<div class="jive-rendered-content">)/ig,"<div>");
  }

  keepOnlyFirstReneredContent(innerHTMLContent);

@jessitron will hate this because I'm changing the html out from under itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment