Search Results

Search found 1174 results on 47 pages for 'escape'.

Page 4/47 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Disable escape in Zend Form Element Submit

    - by Joaquín L. Robles
    I can't disable escaping in a Zend_Form_Element_Submit, so when the label has special characters it won't display it's value.. This is my actual Zend Form piece of code: $this->submit = new Zend_Form_Element_Submit('submit'); $this->submit->setLabel('Iniciar Sesión'); $this->submit->setIgnore(true); $this->addElement($this->submit); I've tried $this->submit->getDecorator('Label')->setOption('escape', false); but I obtain an "non-object" error (maybe submit isn't using the "Label" Decorator).. I've also tried as suggested $this->submit->setAttrib('escape', false); but no text will be shown either.. Any idea? Thanks

    Read the article

  • Oracle 10g - Best way to escape single quotes

    - by satynos
    I have to generate some update statements based off a table in our database. I created the following script which is generating the update statements I need. But when I try to run those scripts I am getting errors pertaining to unescaped single quotes in the content and &B, &T characters which have special meaning in oracle. I took care of the &B and &T problem by setting SET DEFINE OFF. Whats the best way to escape single quotes within the content? DECLARE CURSOR C1 IS SELECT * FROM EMPLOYEES; BEGIN FOR I IN C1 LOOP DBMS_OUTPUT.PUT_LINE('UPDATE EMPLOYEES SET FIRST_NAME= ''' || I.FIRST_NAME|| ''', LAST_NAME = ''' || I.LAST_NAME ''', DOB = ''' || I.DOB|| ''' WHERE EMPLOYEE_ID = ''' || I.EMPLOYEE_ID || ''';'); END LOOP; END; Here if the first_name or last_name contains single quotes then the generated update statements break. Whats the best way to escape those single quotes within the first_name and last_name?

    Read the article

  • Kohana v3, automatically escape illegal characters?

    - by Dom
    Quick question, does Kohana (version 3) automatically escape data that is passed into ORM::factory..... (and everywhere else that has to do with the database)? For example: $thread = ORM::factory('thread', $this->request->param('id')); Would the data passed in the second argument be auto-escaped before it goes in the SQL query or do I have to manually do it? Probably a stupid question and it's better to be safe than sorry, but yeah... I usually do manually escape the data, but I want to know if Kohana does this for me? Thanks

    Read the article

  • JQgrid - escape ':' in searchoptions (value part)

    - by bsreekanth
    Hello, How to set the values for filter is explained here link text. I have two requirements. 1. the default value needs to be empty. I expect, if defaultValue is not set, the filter is empty, but that is not happening in my case. The first value is 2. How to escape ':' in my value. The character ':' and ';' are used to seperate the index and values. But, in my value string it contains a ':' (eg: searchoptions:{value:"1:'Level: 1'"} , where Level: 1 is my first value). How to escape : in the value part. I tried \ , / etc. thanks.

    Read the article

  • Django "Error: cannot import name escape" on windows

    - by Sam
    I cannot run the dev server because of this error ("Error: cannot import name escape"). I assume its because of modifications I've done to the project, but i have no idea how to find where the error is originating from to fix it. I don't import anything called escape anywhere. Update Using django-admin.py rather than the projects manage.py, don't know why... Update 2 Now manage.py is working. This may be because I had a file called email.py which was trying to import email.mime.text (ie trying to import itself) renaming to sendemail.py solved this problem.

    Read the article

  • Kohana v3, escape illegal characters?

    - by Dom
    Quick question, does Kohana (version 3) automatically escape data that is passed into ORM::factory..... (and everywhere else that has to do with the database)? For example: $thread = ORM::factory('thread', $this->request->param('id')); Would the data passed in the second argument be auto-escaped before it goes in the SQL query or do I have to manually do it? Probably a stupid question and it's better to be safe than sorry, but yeah... I usually do manually escape the data, but I want to know if Kohana does this for me? Thanks

    Read the article

  • How to escape single quote

    - by Ravi
    Hello All, How can I escape a ' (single quote) in JS. This is where I'm trying to use it. <input type='text' id='abc' value='hel'lo'> result for the above code is "hel" populated in the text box. I tried to replace ' with \' but this what I'm getting. <input type='text' id='abc' value='hel\'lo'> result for the above code is "hel\" populated in the text box. How can I successfully escape the single quotes.

    Read the article

  • How to escape $ in php using preg_replace ?

    - by sakura
    Hi, I am using preg_replace to escape special characters... $tmpStr=preg_replace("/\?/", "\?", $tmpStr); $tmpStr=preg_replace("/\#/", "\#", $tmpStr); $tmpStr=preg_replace("/\^/", "\^", $tmpStr); $tmpStr=preg_replace("/\&/", "\&", $tmpStr); $tmpStr=preg_replace("/\*/", "\*", $tmpStr); $tmpStr=preg_replace("/\(/", "\(", $tmpStr); $tmpStr=preg_replace("/\)/", "\)", $tmpStr); $tmpStr=preg_replace("/\//", "\/", $tmpStr); but i am not able to escape $ using the same function $tmpStr=preg_replace("/\$/", "\$", $tmpStr); and also when i use the above statement all the spaces get replaced by $ and $ is not getting escaped....someone please help me with this....

    Read the article

  • Python "string_escape" vs "unicode_escape"

    - by Mike Boers
    According to the docs, the builtin string encoding string_escape: Produce[s] a string that is suitable as string literal in Python source code ...while the unicode_escape: Produce[s] a string that is suitable as Unicode literal in Python source code So, they should have roughly the same behaviour. BUT, they appear to treat single quotes differently: >>> print """before '" \0 after""".encode('string-escape') before \'" \x00 after >>> print """before '" \0 after""".encode('unicode-escape') before '" \x00 after The string_escape escapes the single quote while the Unicode one does not. Is it safe to assume that I can simply: >>> escaped = my_string.encode('unicode-escape').replace("'", "\\'") ...and get the expected behaviour?

    Read the article

  • Excel Conditional Formatting With Question Mark

    - by kzh
    I would like to use a conditional formatting rule in an excel file that would color any box with a question mark in it red. It seems that Excel is using a question mark as a wild card and will turn all cells with at least one character in them red. How can i escape the question mark? These don't seem to work: "?" \? '?' ??

    Read the article

  • Excel Conditional Formatting Escaping a Question Mark

    - by kzh
    I would like to use a conditional formatting rule in an excel file that would color any box with a question mark in it red. It seems that Excel is using a question mark as a wild card and will turn all cells with at least one character in them red. How can i escape the question mark? These don't seem to work: "?" \? '?' ??

    Read the article

  • How do I escape ampersands in batch files?

    - by Peter Mortensen
    How do I escape ampersands in a batch file (or from the Windows command line) in order to use the start command to open web pages with ampersands in the URL? Double quotes will not work with start; this starts a new command line window instead. Update 1: Wael Dalloul's solution works. In addition, if there are URL encoded characters (e.g. space is encoded as %20) in the URL and it is in a batch file then '%' must be encoded as '%%'. This is not the case in the example. Example, from the command line (CMD.EXE): start http://www.google.com/search?client=opera&rls=en&q=escape+ampersand&sourceid=opera&ie=utf-8&oe=utf-8 will result in http://www.google.com/search?client=opera being opened in the default browser and these errors in the command line window: 'rls' is not recognized as an internal or external command, operable program or batch file. 'q' is not recognized as an internal or external command, operable program or batch file. 'sourceid' is not recognized as an internal or external command, operable program or batch file. 'ie' is not recognized as an internal or external command, operable program or batch file. 'oe' is not recognized as an internal or external command, operable program or batch file. Platform: Windows XP 64 bit SP2.

    Read the article

  • How to escape HTML.

    - by kokila
    I have a string which contains HTML text. I need to escape just the strings and not tags. For example, I have string which contains, <ul class="main_nav"> <li> <a class="className1" id="idValue1" tabindex="2">Test & Sample</a> </li> <li> <a class="className2" id="idValue2" tabindex="2">Test & Sample2</a> </li> </ul> How to escape just the text to, <ul class="main_nav"> <li> <a class="className1" id="idValue1" tabindex="2">Test &amp; Sample</a> </li> <li> <a class="className2" id="idValue2" tabindex="2">Test &amp; Sample2</a> </li> </ul> with out modifying the tags. Can this be handled with HTML DOM and javascript? Thanks

    Read the article

  • Skip HTML escape in custom label_tag helper in Rail 3

    - by tricote
    Hi, I have this nice class ErrorFormBuilder that allows me to add the error description near the corresponding field in the form view : class ErrorFormBuilder < ActionView::Helpers::FormBuilder #Adds error message directly inline to a form label #Accepts all the options normall passed to form.label as well as: # :hide_errors - true if you don't want errors displayed on this label # :additional_text - Will add additional text after the error message or after the label if no errors def label(method, text = nil, options = {}) #Check to see if text for this label has been supplied and humanize the field name if not. text = text || method.to_s.humanize #Get a reference to the model object object = @template.instance_variable_get("@#{@object_name}") #Make sure we have an object and we're not told to hide errors for this label unless object.nil? || options[:hide_errors] #Check if there are any errors for this field in the model errors = object.errors.on(method.to_sym) if errors #Generate the label using the text as well as the error message wrapped in a span with error class text += " <br/><span class=\"error\">#{errors.is_a?(Array) ? errors.first : errors}</span>" end end #Add any additional text that might be needed on the label text += " #{options[:additional_text]}" if options[:additional_text] #Finally hand off to super to deal with the display of the label super(method, text, options) end end But the HTML : text += " <br/><span class=\"error\">#{errors.is_a?(Array) ? errors.first : errors}</span>" is escaped by default in the view... I tried to add the {:escape = false} option : super(method, text, options.merge({:escape => false})) without success Is there any way to bypass this behavior ? Thanks

    Read the article

  • standard c library for escaping a string.

    - by rampion
    Is there a standard C library function to escape C-strings? For example, if I had the C string: char example[] = "first line\nsecond line: \"inner quotes\""; And I wanted to print "first line\nsecond line: \"inner quotes\"" Is there a library function that will do that transformation for me? Rolling my own just seems a little silly. Bonus points if I can give it a length to escape (so it stops before or beyond the \0).

    Read the article

  • How to escape or remove double quotes in rsyslog template

    - by Evgeny
    I want rsyslog to write log messages in JSON format, which requires to use double-quotes (") around strings. Problem is that values sometime include double-quotes themselves, and those need to be escaped - but I can't figure out how to do that. Currently my rsyslog.conf contains this format that I use (a bit simplified): $template JsonFormat,"{\"msg\":\"%msg%\",\"app-name\":\"%app-name%\"}\n",sql But when a msg arrives that contains double quotes, the JSON is broken, example: user pid=21214 uid=0 auid=4294967295 msg='PAM setcred: user="oracle" exe="/bin/su" (hostname=?, addr=?, terminal=? result=Success)' turns into: {"msg":"user pid=21214 uid=0 auid=4294967295 msg='PAM setcred: user="oracle" exe="/bin/su" (hostname=?, addr=?, terminal=? result=Success)'","app-name":"user"} but what I need it to become is: {"msg":"user pid=21214 uid=0 auid=4294967295 msg='PAM setcred: user=\"oracle\" exe=\"/bin/su\" (hostname=?, addr=?, terminal=? result=Success)'","app-name":"user"}

    Read the article

  • MySQL: how to quote or escape field names?

    - by DrStalker
    Recently I was given a MySQL DB that included a field named time-taken, which caused errors when used in a select because of the minus sign. In this case I was able to rename the field, but for future reference how can field names be quoted or escaped in a MySQL query?

    Read the article

  • Terminal emulation has stopped working. Garbage escape chars

    - by oligofren
    To enable me to do some remote administration of our servers I started using a terminal emulation program called TouchTerm Pro on my iPhone. While not the smoothest experience, it has allowed me to leave my computer behind when going out of town, which makes the slightly painful experience worthwhile. As of late, the app unfortunately no longer works. Pressing up and down keys after logging on via ssh gives me garbage like ^[[A and ^[[B. Combinations with Ctrl - like you can see in the video - no longer works either. Writing full command lines and executing by the enter key works though. Being able to search my bash history was the difference between a usable app and endless frustration, so getting it to work is essential. The app has (of course) met its end of life, not getting updated anymore. I am not quite sure, which side (client or server) that has to be "fixed"/hacked to make the control sequences work again. But is there something I can do to make it work as intended? You can see a video of TouchTerm in operation here.

    Read the article

  • Disable word completion dialog when pressing escape in Safari

    - by Peter
    Behavior: Load Safari 5.0 on mac. Press command+f to search for some text. Type something, and find it on the page. Hit esc to cancel the search. Irritatingly, get word completion menu rather than canceling. Is there any way to make esc cancel the search, like it used to with Safari 4.0, instead of pulling up a word completion dialog? It's very annoying. Failing that, what's the best way to cancel the search with the keyboard? Note: this also happens in any text field, the search box, the location bar etc.

    Read the article

  • How to escape trailing backslash in NVelocity

    - by Ben
    I am using NVelocity to process various PowerShell scripts before they are executed against a server. My question is how to escape a backslash trailing a variable: e.g. ls \\$computername\c$ $computername should be replaced with a valid computer name at runtime, but the trailing backslash (\c$) means that it does not. Thanks Ben

    Read the article

  • Reading escape characters with XMLStreamReader

    - by Roman
    Hi I have a problem reading escape characters inside an xml using. javax.xml.stream.XMLStreamReader for instance I have that tag : <imageURL_large>http://image.shopzilla.com/resize?sq=400&amp;uid=1809235620</imageURL_large> and when I read the value it is read like that : http://image.shopzilla.com/resize?sq=400 Any ideas how that could be fixed ?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >