Last active
December 18, 2015 14:59
-
-
Save tparton42/5800750 to your computer and use it in GitHub Desktop.
This gist demonstrates replacing multiple HTML BR tags in generated content that will be flushed to a PDF via CFDOCUMENT. This helps prevent a known error in ColdFusion 8 when multiple BRs encountered next to one another as well as when there are mixed formats of the BR tag.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- Create a regular expression pattern to find BR tags ---> | |
<cfset variables.patternHTMLBreak = "(<br[^>]*>\s*)" /> | |
<!--- Replace all forms of the BR tag, To handle a wierd IO issue in CF8 using CFDoc with two consecutive BR's ---> | |
<cfset variables.PDFPage = trim(reReplaceNoCase(variables.PDFPage, variables.patternHTMLBreak, "<br/> ", "ALL")) /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment