Forum Discussion
Chad_Roberts_21
Nimbostratus
Jan 23, 2007Quotation Marks in content of HTTP::respond
I have numerous scripts that contain the "HTTP::respond" action, and I've always been able to get around not being able to use a quotation mark in the content until now. I've got a rather long block of javascript I've been asked to attempt to insert, and it contains exactly 1.2 frillion quotation marks. Give or take.
It's not very practical for me to rewrite the whole thing, so is there a way to be able to use quotes in the content? Or perhaps use the ASCII code for the character or something?
- Chad_Roberts_21
Nimbostratus
It looks like using an ASCII code for a quotation mark works, but the problem is that once you've created the iRule and go back to edit it again, your own browser interprets that text in the content of the iRule as a quotation mark as well, making it difficult to edit on the fly when necessary. I guess this will work, but if anybody else has a better idea, please let me know. - Why do you need to get rid of the quotation marks? If the issue is because you are setting a variable to your content and you are enclosing your variables value with quotes and the internal quotes in the data are mucking things up, then there is an easy workaround.
when HTTP_REQUEST { set content {Object not found!"Object" not found!The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.Error 404 } HTTP::respond 404 content $content "Connection" "close" }
The requested URL was not found on this server. If you entered the URL manually please check your
- Chad_Roberts_21
Nimbostratus
Crap. That's exactly what I needed. That's the problem with being self-taught... you miss out on some details.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects