Search Results

Search found 390 results on 16 pages for 'escaping'.

Page 10/16 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Quote marks in controls' property in ASP.NET markup

    - by abatishchev
    Sounds dummy but I can't set to a server-side control's property a value contains quote marks ": <asp:CompareValidator ErrorMessage="Curreny-from can't be equal to currency-to" runat="server" /> I need to quote "from" and "to". I tried escaping \"from\" and double quote marks ""from"" - both doesn't work. How to do that?

    Read the article

  • Sanitizing DB inputs with XSLT

    - by azathoth
    Hello I've been looking for a method to strip my XML content of apostrophes (') like: <name> Jim O'Connor</name> since my DBMS is complaining of receiving those. By looking at the example described here, that is supposed to replace ' with '', I constructed the following script: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output omit-xml-declaration="yes" indent="yes" /> <xsl:template match="node()|@*"> <xsl:copy> <xsl:apply-templates select="node()|@*" /> </xsl:copy> </xsl:template> <xsl:template name="sqlApostrophe"> <xsl:param name="string" /> <xsl:variable name="apostrophe">'</xsl:variable> <xsl:choose> <xsl:when test="contains($string,$apostrophe)"> <xsl:value-of select="concat(substring-before($string,$apostrophe), $apostrophe,$apostrophe)" disable-output-escaping="yes" /> <xsl:call-template name="sqlApostrophe"> <xsl:with-param name="string" select="substring-after($string,$apostrophe)" /> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$string" disable-output-escaping="yes" /> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="node()|@*"> <xsl:apply-templates name="sqlApostrophe"/> </xsl:template> </xsl:stylesheet> However, the processor isn't accepting it. What am I missing here? Is there a better way to get rid of the apostrophes? Perhaps another approach for sanitizing DB inputs by using XSLT? Thanks for your help

    Read the article

  • escape from a linux cli for loop

    - by aidan
    I'm doing something like this: for f in `find -iname '*.html'`; do scp $f remoteserver:$f; done; I've got through about 3 of the 1000 files and I've decided I want to abort the operation. CTRL+C only escapes the SCP login prompt and takes me to the next one, rather than escaping the for loop. Is there a better way than hitting CTRL+C 9997 times? Thanks!

    Read the article

  • Why doesn't MongoDb store my slashes in this string?

    - by Rob Dudley
    Can anyone tell me why this command doesn't work from the MongoDB shell client: db.coll.update({'live':true},{$set:{'mask':"\D\D\D\D\D\D\D\D"}},false,true) but db.coll.findOne({'id':'someId'}) returns the mask field as: "mask" : "DDDDDDDD", Where are the slashes going? I've tried "double escaping" with \\D and that inserts both slashes: "mask" : "\\D\\D\\D\\D\\D\\D\\D\\D", MongoDB shell version: 2.0.6, MongoDB version: 2.0.5, OSX Lion Thanks

    Read the article

  • What's the best way to identify subdomains by PHP dynamically?

    - by kavoir.com
    I have configured the wildcard DNS of *.mydomain.com and it's all working properly. My question is which of these should I rely on identifying client subdomain requests? $_SERVER["HTTP_HOST"] $_SERVER["SERVER_NAME"] $_SERVER["SCRIPT_URI"] They all seem to contain the subdomain part I want but after reading this article by Chris: http://shiflett.org/blog/2005/feb/more-on-filtering-input-and-escaping-output, I'm lost at see and there appears to be no safe way to do this? Any idea on accomplishing this task securely?

    Read the article

  • Escape SQL "LIKE" value for Postgres with psycopg2

    - by Evgeny
    Does psycopg2 have a function for escaping the value of a LIKE operand for Postgres? For example I may want to match strings that start with the string "20% of all", so I want to write something like this: sql = '... WHERE ... LIKE %(myvalue)s' cursor.fetchall(sql, { 'myvalue': escape_sql_like('20% of all') + '%' } Is there an existing escape_sql_like function that I could plug in here? (Similar question to How to quote a string value explicitly (Python DB API/Psycopg2), but I couldn't find an answer there.)

    Read the article

  • Line for signature in markdown

    - by JBarberU
    I'm writing a document using markdown, which I'm exporting to a PDF using pandoc. At the end of the document I need to have space for signatures on a printed copy of the PDF. I've tried to find how to draw a line with a fixed width, but so far I only got to escaping the underscore character, which doesn't feel quite right. It's as if I'm missing something, this couldn't possibly be that unusual to want to do. Any help or pointers are greatly appreciated.

    Read the article

  • How do you make a wrapped div fill the window horizontally?

    - by Alex Parkinson
    I have a div which is contained by another 960px-wide centered div. I'm adding a background to the inner div which should expand all the way to the window's edges horizontally, essentially escaping the boundaries of its container. If I apply a large negative margin and equal amount of padding, this works on the left side, but the right side causes a scroll bar to appear. Does anyone know how I can achieve this without causing scroll bars?

    Read the article

  • jQuery $().find problem

    - by Titanous
    I'm trying to get the contents of a XML document element, but the element has a colon in it's name. This line works for every element but the ones with a colon in the name: $(this).find("geo:lat").text(); I assume that the colon needs escaping. How do I fix this?

    Read the article

  • How do I convert filenames from unicode to ascii

    - by zedwarth
    I have a bunch of music files on a NTFS partition mounted on linux that have filenames with unicode characters. I'm having trouble writing a script to rename the files so that all of the file names use only ASCII characters. I think that using the iconv command should work, but I'm having trouble escaping the characters for the mv command.

    Read the article

  • Why does this properly escaped SQL query fail?

    - by Jason Rhodes
    Here's the query: INSERT INTO jobemails (jobid, to, subject, message, headers, datesent) VALUES ('340', '[email protected]', 'We\'ve received your request for a photo shoot called \'another\'.', 'message', 'headers', '2010-04-22 15:55:06') The datatypes are all correct, it always fails at the subject, so it must be how I'm escaping the values, I assume. I'm sure one of you will see my idiot mistake right away. A little help?

    Read the article

  • IIS 6.0 Server and Unicode Characters

    - by Srikanth
    We are performing a pen test on a simple asp application that uses MS SQL Database. It seems for the authentication they are using dynamic constructed queries but escaping single qoutes. When we use Unicode quotes like %uFFO7,%u02b9 etc we are able to successfully inject SQL injections. Want to understand is it more a kind of configuration issue of IIS server to cannonicalize Unicode characters or the way the validation function to escape single quotes is written is the cause of the problem?

    Read the article

  • Can i rename a file when the user does save as? HTML

    - by acidzombie24
    I use url rewriting and one of my urls is /blah/file ILLEGAL CHARS.jpg ILLEGAL CHARS are names not valid on windows such as * and may confuse servers even after escaping such as ? and /. I know i still cant save filenames as / and ? but certain characters i would like to let through. How can i give a new filename when the user right clicks and selects save as? i'm using asp.net

    Read the article

  • Zend_Db_Select where() and Zend_Db_Adapter quoteInto()

    - by Chris
    Are Zend_Db_Select's where() method, when including the optional value to quite into, and Zend_Db_Adapte's quoteInto() methods basically the same as far as escaping SQL? In other words, are these two pieces of quote identical and equally secure? $select->where($this->getAdapter()->quoteInto('id = ?', 3)); $select->where(id = ?, 3); Thanks!

    Read the article

  • Bash preexecute

    - by Alex_Bender
    I'm trying to write bash command wrapper, which will be patch bash current command on the fly. But i'm faced with the problem. As i'm not a good Shell user, i can't write right expression of variable assignment in string. See bellow: I'm set trap to preexecute, through this: alex@bender:~$ trap "caller >/dev/null || xxx \"\${BASH_COMMAND}"\" DEBUG; I want change variable BASH_COMMAND, do something like BASH_COMMAND=xxx ${BASH_COMMAND} but i don't know, how i need escaping variables in this string NOTE: xxx -- my custom function, which must return some value, if in end of command situated word teststr function xxx(){ # find by grep, if teststr in the end `echo "$1" | grep "teststr$" >/dev/null`; # if true ==> do if [ "$?" == "0" ]; then # cut last 6 chars (len('teststr')==6) var=`echo "$1" | sed 's/......$//'`; echo "$var"; fi } How can i do this stuff?: alex@bender:~$ trap "caller >/dev/null || ${BASH_COMMAND}=`xxx $BASH_COMMAND`" DEBUG;

    Read the article

  • Run Python Server at Startup

    - by DizzyDoo
    Hello, I've got a few Python based servers that I need to run, and would like them to start automatically when I start my Ubuntu Server box. What is the best way to execute them like this? I was hoping I could write a Bash script and use Screen to get them running in the background, where I can check on them every now and then, but where as echo screen -d -m python works just fine, echo screen -d -m `sudo python /home/matt/tornadoServer/tornadoDeploy.py` doesn't, with no error messages. Is that something to do with the spaces? Even though I did surround it with backquotes? I also tried: WEB="screen -d -m `sudo python /home/matt/tornadoServer/tornadoDeploy.py`" echo $WEB As a way of escaping the spaces, but no luck. What's Bash scripting way to do this? And, once the Bash script works, where can I put it to make it execute on startup?

    Read the article

  • linux shell, keep task alive for specified time

    - by liori
    Hello, I am looking for a tool to keep a task alive (restarting if necessary) for a specified amount of time (in seconds), and then kill it and stop. For example: keep_for 3600 rsync foo bar:faz should for try to synchronize a directory (restarting rsync in case of f.e. dropped connection), but explicitly kill rsync and stop respawning it after an hour. I tried to write a shell script for that, but it was surprisingly difficult to write, with lots of edge cases (like child process not getting killed, or shell escaping issues). So... maybe there already is a tool for that?

    Read the article

  • Escape a ! in the password parameter of wget

    - by Dave
    I'm trying to execute something like this: wget --user=foo --password=bar! url The ! in the password is causing problems. I've tried escaping it with \, as in --password=bar\! I've tried encapsulating in single and double quotes. I put the password in a separate file and tried --password=cat pass.txt Each time, I get a 403 Forbidden. Using -d, I see that the SSL handshake is successful. On the Windows command line, the command works. My assumption is that I need to escape the ! differently, but I don't know how else.

    Read the article

  • UNIX "find" command, match literal "dot"

    - by Robottinosino
    I need files ending with ".pdf" or ".png"; here's my attempt: find /Users/robottinosino/Desktop/_PublishMe_ -type f -regex '.*[pdf|png]' this incorrectly includes files ending with "Apdf", "Zpdf", etc. (missing literal dot before file extension) I tried adjusting the pattern to: find /Users/robottinosino/Desktop/_PublishMe_ -type f -regex '.*\.[pdf|png]' but then no results are returned. Escaping the . with a backslash does not work. Why? [0] $ uname -a Darwin Robottinosino.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 Thanks!

    Read the article

  • What's a good tool for checking from my own machine that my server is up?

    - by chico
    I'm looking for a good tool (web site or not) that I can use to do a simple check whether my web server is accessible from outside LAN (it's serving in a non-standard port). To give some context, I've gone through this problem: can't access my ip from outside. Even the tools I've found are not really working. Currently to fetch the html I serve with the online bash tool I do: curl <my ip>:<my port> \ | sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g; s/"/\&quot;/g; s/'"'"'/\&#39;/g' I'm looking for a simple tool that can display the html properly, or just show raw text without resorting to sed html escaping and curl.

    Read the article

  • Remove Duplicate Messages from Maildir

    - by Joseph Holsten
    I've got a bunch of duplicate messages in my IMAP server's Maildir. What's the best way to remove them? Some relevant points: Shared Message-ID is usually a good enough definition of duplicate. A tiny script that removes all but one of the duplicate messages would work. Sometimes it's necessary to find duplicates based on shared message bodies. What's a reasonable definition of shared here? Bitwise equivalent? What about weird differences in line wrapping, escaping, character encoding? Sometimes there's some meaningful difference between 'duplicate' messages. What's the best way to review the differences in sets of 'duplicate' messages? Diffs?

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16  | Next Page >