I noticed that in IE11 and Edge (but not Chrome), Extjs6 is encoding my jsonData in a strange way. If I do a POST with the string '8/17/2016 13:07:00' as one of the jsonData parameters, it will pass '\u200e8\u200e/\u200e17\u200e/\u200e2016 13:07:00' in the request body.
I also noticed that if I enter Ext.JSON.encode('8/17/2016 13:07:00') into the console that it converts the string in the same way. I suspect that Extjs is using IE's encoder (since Chrome works), so it is really an IE issue and not an Extjs issue. Can you please explain why this happens and if there is a format that will not convert improperly for my POST?
There is a simple mistake here as far as i think.
Do
Ext.JSON.encode("8/17/2016 13:07:00")
instead of
Ext.JSON.encode('8/17/2016 13:07:00')
then it will take it as the string that you want.
And ya one more thing, this issue will be in latest chrome version also.
Once I discovered the issue is with toLocaleDateString(), then I found this post which answered the question:
ToLocaleDateString() changes in IE11
Instead of Ext.encode(new Date('2016-08-17T06:37:00').toLocaleDateString()), use Ext.encode(new Date('2016-08-17T06:37:00').toLocaleDateString().replace(/\u200E/g, ''))
Related
We have developed a site using AngularJS 1.2.x version. The data to be displayed is got as a JSON and we have used angular expresions to populate these.
In the JSON response we have a URL in this format http://username#site.com. This is getting rendered properly in Chrome, FF. But in IE11 we are getting the following exception
Error: A security problem occurred.
at xa (site/angularjs.d7ecc107a031818a8e5269a12c25ec8e.js:124:230)
at Anonymous function (site/angularjs.d7ecc107a031818a8e5269a12c25ec8e.js:116:319)
at Anonymous function (site/angularjs.d7ecc107a031818a8e5269a12c25ec8e.js:116:319)
at Anonymous function (site/angularjs.d7ecc107a031818a8e5269a12c25ec8e.js:116:319)
at r (site/angularjs.d7ecc107a031818a8e5269a12c25ec8e.js:7:390)
at start (site/angularjs.d7ecc107a031818a8e5269a12c25ec8e.js:285:470)
at c (site/angularjs.d7ecc107a031818a8e5269a12c25ec8e.js:282:408)
at G (site/angularjs.d7ecc107a031818a8e5269a12c25ec8e.js:284:243)
at Anonymous
We found a similar question in(Angularjs with Internet Explorer 11, security issue) but the link provided in the accepted answer is no longer valid.
Is there any workaround to solve this issue?
I guess it's not possible, it's a security matter of IE and there's no workaround for that other than changing the url format to something IE accepts.
About the broken link, for some reason the english version of that article is not available anymore, but I've switched the locales in the url and managed to find other languages including pt-BR, pt-PT, es-ES and based on your profile hi-IN, if that doesn't work for you, you can try to Google Translate one of them to english or even try different lacale in the article url.
Those are the ones I tried and they're not broken:
Portuguese (Portugal) : pt-PT - https://support.microsoft.com/pt-pt/help/834489
Chinese (China) : zh-cn - https://support.microsoft.com/zh-cn/help/834489
Portuguese (Brazil): pt-BR - https://support.microsoft.com/pt-br/help/834489
Spanish (Spain): es-ES - https://support.microsoft.com/es-es/help/834489
Hindi (India): hi-IN - https://support.microsoft.com/hi-in/help/834489
Japanese (Japan): ja-jp - https://support.microsoft.com/ja-jp/help/834489
There ought to have more locales available but I'm not wiling to test all of them.
I working on building some tests via the JMeter Webdriver plugin and am having issues with entering text into a textbox. Here is my code:
var textField = WDS.browser.findElement(pkg.By.id('element_id'))
textField.click()
textField.sendKeys('JMeter Test')
I get undefined for the sendKey method but both the findElement and .click() commands work without error...I have tried using .clear() as well with no luck. I have used the sendKeys command multiple times prior without issue. The field is in a modal, if that is relevant. Any suggestions? Thanks.
Okay..tried a bunch of complicated fixes but all I needed to do was add brackets...I thought you only needed to use brackets with variables but I guess not. So the code that worked was:
var textField = WDS.browser.findElement(pkg.By.id('element_id'))
textField.click()
textField.sendKeys(['JMeter Test'])
Thanks for your responses, Adam T.
I have tried all options, but nothing worked.
I changed the script Language from java to groovy. Then it worked.
var uname=WDS.browser.findElement(org.openqa.selenium.By.xpath("//input[#id='username']"));
uname.click();
uname.sendKeys("sampleUserName");
in Silverlight 5:
var uri= new Uri("http://www.last.fm/api/auth/?api_key=xyz&cb=http://localhost:19000/callback?bla=blu")
HtmlPage.Window.Navigate(uri);
lands my browser at:
http://www.last.fm/api/auth?api_key=xyz&cb=http://localhost:19000/callback%253Fbla=blu
Note how the "?" of the URL in the callback parameter gets escaped to %253F - even though, if I look at uri.ToString() in the debugger, it's not escaped.
How can I prevent that from happening?
Many thanks,
Max
I got no answer, but if anyone stumbles across the same issue, here's what I tried and what I finally did:
First, I attempted to use HtmlPage.Window.Eval() to execute javascript which would navigate to that URL. Again, the ? was escaped even though URL.ToString() didn't escape it.
So what I finally did - could have thought of it earlier, really ;P - was to change my callback handler to follow a REST like format. Instead of:
http://localhost:19000/callback?bla=blu
it now listens at:
http://localhost:19000/callback/bla=blu
and takes the parameter value out of the path. No question mark involved anymore, problem solved.
I have a strange problem with request param value. Silverlight application is opened inside aspx page. Problem appears when my queryString contains equals sign.
I inspected values in silverlight application and found out that value from uri differs from value retrieved as queryString parameter:
HtmlPage.Document.DocumentUri.OriginalString:
"http://localhost:8081/SilverlightContainer.aspx?sys_ObjectId=2&sys_Param1={\"p1\":\"Narud\\u017Ebenica =\"}"
HtmlPage.Document.QueryString["sys_Param1"]:
"{\"p1\":\"Narud\\u017Ebenica "
If sys_Param1 doesn't contain equals sign everything works as expected.
Thanks.
I solved this by removing problematic part of url and reading javascript variable from silverlight instead of passing it in querystring.
Another way is using javascript encodeURIComponent but I decided to use variable approach.
I still don't know what causes this problem since my url look correct.
I want to process a template with a Google plusone button in it through phpQuery and I run into the following problem:
require_once( "phpQuery.php" );
$p = phpQuery( "<g:plusone></g:plusone>" );
echo $p->html();
the expected output would be:
<g:plusone></g:plusone>
But instead the output of this is:
<plusone></plusone>
Which doesn't match up with what google is expecting, so the button doesn't work any more. How can I stop phpQuery from changing (fixing?) my code, or how can I work around this problem without changing the string from plusone to g:plusone once the processing is done? (that's a nasty workaround, plus, I run into more of these 'translation'-problems in phpQuery).
I had the same problem while including a google+ badge. I could force the code generator from google to generate code with a div container. I just had to tick the "html5 valid code" checkbox.
I've been looking all over for solutions for this problem, to no avail. I found a horrible workaround. I'm sure this is NOT the most elegant way to do this, but at least it fixes the problem.
Instead of the tags:
<g:plusone>...</g:plusone>
use:
<g__0058__plusone>...</g__0058__plusone>
Then simply str_replace the result before you're outputting:
echo str_replace("__0058__",":",$doc->html());
Basically in a tag where you would normally put a colon (:) you put 0058 instead. It's a very non-elegant solution, I realise that, but at least it's a workaround to this old problem.