Skip to content

Instantly share code, notes, and snippets.

@HarpyWar
Created February 2, 2012 14:56
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 HarpyWar/1723831 to your computer and use it in GitHub Desktop.
Save HarpyWar/1723831 to your computer and use it in GitHub Desktop.
bbcodeParser.htmlToBBCode doesn't work with complex tags.
For instance:
bbcodeParser.addBBCode('[quote={TEXT1}]{TEXT2}[/quote]', '<div class=quote><cite>{TEXT1}</cite><p>{TEXT2}</p></div>');
var bbcode = bbcodeParser.htmlToBBCode('<div class=quote><cite>Author</cite><p>My message</p></div>');
It returns the same HTML string, but not BB code string.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment