Search Results

Search found 158 results on 7 pages for 'backslash'.

Page 1/7 | 1 2 3 4 5 6 7  | Next Page >

  • Prevent backslash from being parsed by javascript for a string

    - by user286269
    A Flash AS3 IRC application sends me a string like "f\reak" to my javascript. Irc allows the \ in usernames which poses a problem when its passed to javascript. "f\reak" become "feak" in javascript making the \r into a carriage return. Is there a way to read the absolute value of the string instead of parsing a carriage return? These don't methods didn't work str.valueOf() str.toString() str.charAt(position of the \ ) this just sees the carriage return as well and not a backslash

    Read the article

  • PHP replace backslash

    - by Skyfe
    Hi there, Been struggling with replacing a backslash by another symbol such as '.-.' just to indicate the position of backslashes as I could not send a string such as 'C\xampp\etc.' through url as GET variable so I thought I'd first replace the backslashes in that string by another symbol, then send through url, and then replace them back to backslashes in the PHP file that handles it. Though would there be a better way to send such strings through url? Because when I try a script such as: $tmp_name = preg_replace("\", ".-.", $_FILES['uploadfile']['tmp_name']); It turns out into a php error as \ is also used as delimiter.. Could anyone help me out on this? Thanks in advanced! Btw, if I'd be able to send a full array through url, this whole problem would be solved, but I don't think it's possible?

    Read the article

  • Replacing backslash with another symbol in PHP

    - by Skyfe
    Hi there, Been struggling with replacing a backslash by another symbol such as '.-.' just to indicate the position of backslashes as I could not send a string such as 'C\xampp\etc.' through url as GET variable so I thought I'd first replace the backslashes in that string by another symbol, then send through url, and then replace them back to backslashes in the PHP file that handles it. Though would there be a better way to send such strings through url? Because when I try a script such as: $tmp_name = preg_replace("\", ".-.", $_FILES['uploadfile']['tmp_name']); It turns out into a php error as \ is also used as delimiter.. Could anyone help me out on this? Thanks in advanced! Btw, if I'd be able to send a full array through url, this whole problem would be solved, but I don't think it's possible?

    Read the article

  • Sending ctrl-backslash from Windows to Linux using Synergy

    - by jrbushell
    I'm using Synergy+ to share the keyboard and mouse between a Windows and a Linux (Red Hat) PC. The Windows box is the server, Linux is the client, and both are running version 1.3.4. My Windows box is set up for English UK keyboard. In a Linux terminal window, Ctrl+\ (backslash) sends a quit signal to the currently running program - useful to kill a Python script that's run amok, for example. When I try to do this via synergy, Ctrl+- (minus) is sent instead. This has the undesired effect of resizing my terminal window :( Backslash on its own and Shift-backslash = pipe both work fine. Any ideas what's happening?

    Read the article

  • Getting a lot of backslash underscore errors from webmaster tools

    - by Vermino
    I'm using a wordpress site and I thought I got all the kinks out of it. For some reason Webmaster tools is crawling my website and showing a lot of 404 errors which are from "/_" like additional pages that's i've never created. I just can't figure out what is creating these to google crawlers and then displaying a 404. my robots txt http://www.redcherryshrimp.net/robots.txt my sitemap created from Yoast plugin http://www.redcherryshrimp.net/sitemap_index.xml I have Yoast(creates the sitemap) and Jetpack plugins installed

    Read the article

  • Trouble with backslash characters and rsyslog writing to postgres

    - by Flimzy
    I have rsyslog 4.6.4 configured to write mail logs to a PostgreSQL database. It all works fine, until the log message contains a backslash, as in this example: Jun 12 11:37:46 dc5 postfix/smtp[26475]: Vk0nYDKdH3sI: to=<[email protected], relay=----.---[---.---.---.---]:25, delay=1.5, delays=0.77/0.07/0.3/0.35, dsn=4.3.0, status=deferred (host ----.---[199.85.216.241] said: 451 4.3.0 Error writing to file d:\pmta\spool\B\00000414, status = ERROR_DISK_FULL in "DATA" (in reply to end of DATA command)) The above is the log entry, as written to /var/log/mail.log. It is correct. The trouble is that the backslash characters in the file name are interpreted as escapes when sent to the following SQL recipe: $template dcdb, "SELECT rsyslog_insert(('%timereported:::date-rfc3339%'::TIMESTAMPTZ)::TIMESTAMP,'%msg:::escape-cc%'::TEXT,'%syslogtag%'::VARCHAR)",STDSQL :syslogtag, startswith, "postfix" :ompgsql:/var/run/postgresql,dc,root,;dcdb As a result, the rsyslog_insert() stored procedure gets the following value for as msg: Vk0nYDKdH3sI: to=<[email protected], relay=----.---[---.---.---.---]:25, delay=1.5, delays=0.77/0.07/0.3/0.35, dsn=4.3.0, status=deferred (host ----.---[199.85.216.241] said: 451 4.3.0 Error writing to file d:pmtaspoolB The \p, \s, \B and \0 in the file name are interpreted by PostgreSQL as literal p, s, and B followed by a NULL character, thus early-terminating the string. This behavior can be easiily confirmed with: dc=# SELECT 'd:\pmta\spool\B\00000414'; ?column? -------------- d:pmtaspoolB (1 row) dc=# Is there a way to correct this problem? Is there a way I'm not finding in the rsyslog docs to turn \ into \\?

    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

  • Using .htaccess to replace backslash in URL with forward-slash

    - by DamienL
    I realise that a backslash should never appear in a URL in a form other than a URL escape code, however in this case the URL's are being generated by a .NET application for generating flashbooks. I have contacted the developer of this application with a bug report. In the interim i would like to use .htaccess to rewrite the offending backslashes. This is how the URLs appear in fiddler debugging proxy. www.example.com/folder/folder/thumbs%5C1.jpg I am using Firefox and it looks as though Firefox is translating them into the URL encoded equivalent ( \ == %5C1 ). Interestingly IE translates the backslash into a forward-slash automatically (not adhering to standards but convenient in this case). Is there a way to use .htaccess to rewrite all \ to /?

    Read the article

  • Redirect help fixing broken backslash link

    - by zac
    I just accidentally launched a campaign that is driving traffic to index.html/ (backslash is breaking it)... I am not sure I can access the .htaccess and was wondering if I were to create a page so that people directed to this path would see soemthing what would the name of that page be? Since there is no name just an extra slash I am not sure how to handle this.

    Read the article

  • Backslash escaping in RegularExpressionValidator

    - by frogbot
    I need to ensure that the input value contains at least one dot, so i use the following: <asp:RegularExpressionValidator runat="server" ControlToValidate="MyInput" Text="*" ErrorMessage="must contain at least one dot" ValidationExpression="\.+" /> And that doesn't work. By inspecting the page source i can see that ASP.NET escapes the backslash character so in java-script it looks like "\\.+". Why does it do so and how do i prevent RegularExpressionValidator from escaping it?

    Read the article

  • Removing a Preceding Backslash from Apostrophes

    - by John
    Hello, When I add a comment using the variable below, apostrophes are printed with a backslash in front of them. How can I get rid of the backslashes? Thanks in advance, John Example of printed result: My roommate\'s brother\'s ex-girlfriend\'s aunt drive a Toyota. $comment = mysql_real_escape_string($_POST['comment']);

    Read the article

  • Ruby: backslash all non-alphanumeric characters in a string

    - by HBlend
    I have a script where I need to take a user's password and then run a command line using it. I need to backslash all (could be more then one) non-alphanumeric characters in the password. I have tried several things at this point including the below but getting no where. This has to be easy, just missing it. Tried these and several others: password = password.gsub(/(\W)/, '\\1') password = password.gsub(/(\W)/, '\\\1') password = password.gsub(/(\W)/, '\\\\1')

    Read the article

  • Backslash in JavaScript

    - by erasmus
    In my javascript code I have onchange="document.getElementById('user_name').value = document.getElementById('theDomain').value + '\\' + document.getElementById('fake_user_name').value" here backslash doesn't work. What is the problem? How should I write it?

    Read the article

  • javascript eval backslash in window NT path problem

    - by Hammad Tariq
    I am experiencing a classic JS case (in my opinion) but after a lot of googling, still not able to find a solution. Backslash is considered as a escape character in JS but what you need when you need to pass windows path from the JS and print it? I am using eval because my java applet is executing the code and placing bits when it has a string to evaluate. That's why eval is necessary, however I have made an example which is below: <div id="mainTabs"></div> <script> var s = "document.getElementById('mainTabs').innerHTML='\\C\ganye\file.doc'"; eval(s); </script> I tried double backslashes, not working, if anyone could help me get around this with as less hassle as possible, I will feel grateful.

    Read the article

  • Problem when reading backslash in Prolog

    - by Jerry
    I'm writing a lexer in Prolog which will be used as a part of functional language interpreter. Language spec allows expressions like for example let \x = x + 2; to occur. What I want lexer to do for such input is to "return": [tokLet, tokLambda, tokVar(x), tokEq, tokVar(x), tokPlus, tokNumber(2), tokSColon] and the problem is, that Prolog seems to ignore the \ character and "returns" the line written above except for tokLambda. One approach to solve this would be to somehow add second backslash before/after every occurrence of one in the program code (because everything works fine if I change the original input to let \\x = x + 2;) but I don't really like it. Any ideas?

    Read the article

  • Escape doube and single backslashes in a string in Ruby

    - by Nick Gorbikoff
    Hello. I'm trying to access a network path in my ruby script on a windows platform in a format like this. \\servername\some windows share\folder 1\folder2\ Now If I try to use this as a path, it won't work. Single backslashes are not properly escaped for this script. path = "\\servername\some windows share\folder 1\folder2\" d = Dir.new(path) I tried everything I could think of to properly escape slashes in the path. However I can't escape that single backslash - because of it's special meaning. I tried single quotes, double quotes, escaping backslash itself, using alternate quotes such as %Q{} or %q{}, using ascii to char conversion. Nothing works in a sense that I'm not doing it right. :-) Right now the temp solution is to Map a network drive N:\ pointing to that path and access it that way, but that not a solution. Does anyone have any idea how to properly escape single backslashes? Thank you

    Read the article

  • Replacing backslashes in Python strings

    - by user323659
    I have some code to encrypt some strings in Python. Encrypted text is used as a parameter in some urls, but after encrypting, there comes backslashes in string and I cannot use single backslash in urllib2.urlopen. I cannot replace single backslash with double. For example: print cipherText '\t3-@\xab7+\xc7\x93H\xdc\xd1\x13G\xe1\xfb' print cipherText.replace('\\','\\\\') '\t3-@\xab7+\xc7\x93H\xdc\xd1\x13G\xe1\xfb' Also putting r in front of \ in replace statement did not worked. All I want to do is calling that kind of url: http://awebsite.me/main?param="\t3-@\xab7+\xc7\x93H\xdc\xd1\x13G\xe1\xfb" And also this url can be successfully called: http://awebsite.me/main?param="\\t3-@\\xab7+\\xc7\\x93H\\xdc\\xd1\\x13G\\xe1\\xfb" Any idea will be appreciated.

    Read the article

  • How to remove my backslash while input have underscore

    - by bob
    Problem when I enter any input which has underscore (_) data will store to my db looks like this image\_background.png Example $image = stripslashes($_POST['image']); // example image name image_background.png $query = 'UPDATE product SET image="' . $db->string_escape($image, true) . '" WHERE id="' . intval($id) . '"'; The problem coming when input has underscore only. If without underscore all backslashes will remove by the stripslashes Let me know.

    Read the article

  • The case of the sneaky backslash - Regex

    - by Shane Cusson
    I'm missing something very obvious here, but I just cant see it. I've got: string input = @"999\abc.txt"; string pattern = @"\\(.*)"; string output = Regex.Match(input,pattern).ToString(); Console.WriteLine(output); My result is: \abc.txt I don't want the slash and cant figure out why it's sneaking into the output. I tried flipping the pattern, and the slash winds up in the output again: string pattern = @"^(.*)\\"; and get: 999\ Strange. The result is fine in Osherove's Regulator. Any thoughts? Thanks.

    Read the article

  • As3 split strangeness

    - by coulix
    Hello coders, Super simple example: var Path:String="E:\SWF Security\Acess Current Path\Access SWF URL.swf" var Path1:Array = Path.split("\\") // Split using the backslash as delimiter (No limit the number of returned tokens) trace(Path1) What do you expect path1 to be ? E: ? No its E:SWF SecurityAcess Current PathAccess SWF URL.swf and i have no idea why.

    Read the article

  • JavaScript: A BackSlash as part of the string

    - by Abs
    Hello all, I have a JavaScript variable that I echo out using PHP which is shown like this in the page source: var db_1 = 'C:\this\path'; When I set the value of a text field with that variable like so: $('#myinput').val(db_1); The slashes have disappeared and only the other characters are left! Why is this and how can I put the slashes back in?? Thanks all

    Read the article

  • perl + want to put uniq char as @ without backslash "\"

    - by yael
    I need to know if there is some way to replace any string as @ or * or ? or & without to put the "\" before it Example perl -pe 'next if /^#/; s/\@d\&/new_value/ if /param5/' test in this example need to replace the @d& with new_value but I need to put the "\" before @ or & can be other way without to put the "\" because I have random char that can be in the old value.

    Read the article

1 2 3 4 5 6 7  | Next Page >