Skip to content

Instantly share code, notes, and snippets.

@jeffturcotte
Created July 11, 2012 01:28
Show Gist options
  • Save jeffturcotte/145e49dbd406e8516c54 to your computer and use it in GitHub Desktop.
Save jeffturcotte/145e49dbd406e8516c54 to your computer and use it in GitHub Desktop.
fHTML patch for dashed in element attributes
Index: flourish/fHTML.php
===================================================================
--- flourish/fHTML.php (revision 1041)
+++ flourish/fHTML.php (working copy)
@@ -174,7 +174,7 @@
}
// Find all html tags, entities and comments
- $reg_exp = "/<\s*\/?\s*[\w:]+(?:\s+[\w:]+(?:\s*=\s*(?:\"[^\"]*?\"|'[^']*?'|[^'\">\s]+))?)*\s*\/?\s*>|&(?:#\d+|\w+);|<\!--.*?-->/s";
+ $reg_exp = "/<\s*\/?\s*[\w\-:]+(?:\s+[\w\-:]+(?:\s*=\s*(?:\"[^\"]*?\"|'[^']*?'|[^'\">\s]+))?)*\s*\/?\s*>|&(?:#\d+|\w+);|<\!--.*?-->/s";
preg_match_all($reg_exp, $content, $html_matches, PREG_SET_ORDER);
// Find all text
@@ -315,4 +315,4 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
- */
\ No newline at end of file
+ */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment