Forum Discussion
Problem with replicating escape characters in an external file data group
I've got an irule that generates a maintenance page - it's based on some of the maintenance page irule recipes that have been posted here - which calls a data group external file that contains some html. It's in the format "key " := "blah blah html code is here blah", and any " characters in the html are escaped with a \ character, so CONTENT="text/html" becomes CONTENT=\"text/html\". When I create the data group and it reads in the file fresh, it rewrites it with the \ and " characters escaped. So \" becomes \\\". The next time it refreshes the data group, it rewrites the file with the \ and " characters escaped. So \" becomes \\\\\\\".
After the second or third time the file is refreshed, the number of escape characters somehow starts confusing my browser and things don't render properly. Also, I figure if this goes on, eventually my 2.3K html file will turn into several gigs of \ characters with some bits of html interspersed.
How do I keep the file from continually adding more \ characters?
Thanks for any help.
EDIT: file samples below.
3 Replies
- rmd1023
Nimbostratus
..... and of course the forum software parsed the html. Let's try that again in block quotes:"key " := " This computer's access to the network has been restricted This computer's access to the network has been restricted Our apologies for the inconvenience, but this computer has been prevented from accessing the network. To re-enable network access for this machine please contact your front-line support provider (FSP). Until network access has been restored you will not be able to send email from this computer. Please do not attempt to reconnect this system to the network until you have consulted with your support provider. Site 1 For group 1, please call the helpdesk at 1-2345. For group 2, please call your FSP. If you do not know who your FSP is you may contact the Support Center at 2-3456. Site 2 Users in group 2 should contact the Learning Resource Center (LRC) at 555-555-1212 in the Maguffin Building. Users with DMCA notices will be required to speak with their respective offices. Users in group 3 should contact the FSP for their department. If you do not know who your FSP is you may contact the Support Center at 3-4567. Site 3 Call Site Information Technology Services at 4-5678. Copyright © 2013 Network Operations Center ",
"key " := " This computer's access to the network has been restricted This computer's access to the network has been restricted Our apologies for the inconvenience, but this computer has been prevented from accessing the network. To re-enable network access for this machine please contact your front-line support provider (FSP). Until network access has been restored you will not be able to send email from this computer. Please do not attempt to reconnect this system to the network until you have consulted with your support provider. Site 1 For group 1, please call the helpdesk at 1-2345. For group 2, please call your FSP. If you do not know who your FSP is you may contact the Support Center at 2-3456. Site 2 Users in group 2 should contact the Learning Resource Center (LRC) at 555-555-1212 in the Maguffin Building. Users with DMCA notices will be required to speak with their respective offices. Users in group 3 should contact the FSP for their department. If you do not know who your FSP is you may contact the Support Center at 3-4567. Site 3 Call Site Information Technology Services at 4-5678. Copyright © 2013 Network Operations Center ",
- James_39417Historic F5 Account
Take a look at this Solution article on askf5.com.
SOL12185: The BIG-IP system adds additional backslash characters to escaped quotes in an external string class.
http://support.f5.com/kb/en-us/solutions/public/12000/100/sol12185.html
--
- rmd1023
Nimbostratus
I ended up having to do a variation on that. Since there were " characters involved there had to be some escaping and I had to specify a key. So the include file looked more like this:
And I did a "b merge" with that file and saved it.class my.page.html.class { { "key" { " My Boring Page Blah blah content goes here " } } }
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com