Skip to content

Instantly share code, notes, and snippets.

@hborders
Created June 16, 2013 05:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hborders/5790844 to your computer and use it in GitHub Desktop.
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
Copy link

adkron commented Jun 16, 2013

  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