® symbol not being parsed in JSON-LD. Backslash(/) doesn't work - schema

So I'm currently uploading a website schema and it has thrown up some parsing errors in a string. The ® symbol is showing up as shown below. However, adding a backslash does not seem to work and is still throwing up an error on Google's Structured Data Testing tool.
For example:
'''"name": "What is ___Secure®?",'''
This throws up the error shown.
But even when I add a backslash as an escape character, it doesn't show properly, as shown.
What is the way out of this?
Thanks.

Related

Unable to embed a screenshot to the SpecFlow html Report

I am executing my automation scenarios using SpecFlow with Visual Studio.
I want to Embed a custom image to the HTML report which was generated by SpecFlow. That image is a screenshot i am taking whenever scenario is failed in Hooks.
Please help me out.
This is what i am seeing in the html report - enter image description here
Take a look at the SeleniumWebTest sample project here. This sample project shows how to include a screenshot in your report. While the example is Selenium-based, the same principles apply to other frameworks.
A more in-depth explanation of how this works can be found here under "Including Screenshots". Essentially, you need to abuse the console and use it to output your images' file paths.
Any data written to the console is available in your report (this is how the trace details are received by the report). You will need to parse the data written to the console and strip out the file path you want to embed. Make sure that you strip the image path completely so that you don't output the file path as part of the other trace information received from the console.
Edit: I've since discovered that there seems to be an issue with the template in the sample project. The following section in the template is bugged:
class="log">#Raw(FormatTechMessages(traceEvent.TechMessages.TrimEnd()).Replace("SCREENSHOT[ <a href="http://specflow.org/plus/documentation/,-/" data-page=",-"<img width='1000' src=").Replace("</a> ]SCREENSHOT", "</img>"))</pre>
This is because the console no longer seems to be formatting the file as a hyperlink, so the replacement string is never found. Updating this line in ReportTemplate.cshtml seems to have done the trick:
<pre class="log">#Raw(FormatTechMessages(traceEvent.TechMessages.TrimEnd()).Replace("SCREENSHOT[ ", "<img width='1000' src=\"").Replace(" ]SCREENSHOT", "\"</img>"))</pre>
As the console is no longer formatting the file as a hyperlink, you only need to replace the padding (in this case the "SCREENSHOT[]SCREENSHOT") from the string and instead enclose the path with the <IMG> tag. You also need to add the quotes around the file path.

Error message showing up in Google search results

When I search for a specific keyword in Google. The website shows up, but where normally the meta description is being displayed, it shows a error message instead:
Warning: Invalid argument supplied for foreach() in C:\domains\domain.com\wwwroot\wp-content\themes\canvas\somefile.php on line 417
How is it possible that google shows this line of text instead of a normal description?
Because it's probaly the thing that shows up in either the or google somehow onlyl got that result when fetching the page.
Google does not filter error messages.
for example if you search Warning: Invalid argument supplied for foreach() in on you get http://www.bibliotheekgulpen-wittem.nl/index.php/2013-11-04-09-27-41/bibliotheek-wise-ap/134-bibliotheek-wise-app-2014 with a invalid foreach.
Looking at the page itself there is nothing invalid to be seen in the source.
Just bad luck that when google fetched the page it had an error.

Responsive website screenshot with Pageres with URLs from a text file

I am trying to use pageres(https://github.com/sindresorhus/pageres) module to take screenshots of my website in different resolutions.
It works fine when I provide the URL and the size in command line but it doesn't work when I have my urls in a text file. It takes a screenshot of only the last URL in the file. I use the following command to run pageres:
pageres 640x768 < urls.txt
URLs in the text file are newline separated so they look like this:
http://www.yahoo.com
http://www.msn.com
http://www.apple.com
So it basically takes a screenshot of only apple.com and throws the error below for each of the screenshot above it.
The error I get is:
TypeError: 'undefined' is not an object <evaluating 'options.windowSize.width'>
and the file it points to is webshot.phantom.js line 13.
Am I running the command incorrectly or something? I use it the way it is mentioned on their site.
Thank you for your help.
It might have been a bug at some point, but it works fine in the latest version. Just tested.

missing line breaks

I'm trying to include a fb feed on a website using the graph api
ie. https://graph.facebook.com/xxx?fields=feed
This works fine but I noticed when looping through the objects that the actual content is missing layout formatting, especially line breaks. This makes the content of the returned strings rather unusefull for me right now.
Is there another way of retrieving the formatted text, or am I missing something here?
thx!
This works fine but I noticed when looping through the objects that the actual content is missing layout formatting, especially line breaks.
And how are you doing this “looping through”, or rather more important, how are you checking that there are no line breaks?
or am I missing something here?
Well, you wouldn’t be the first one to forget that HTML does just display any whitespace condensed to one space character under normal circumstances …

Mysterious FireBug Error repeats with ExtJS

When debugging ExtJS 4 (tried both versions 4.1.0 and 4.1.1), FireBug repeatedly shows the following error: An invalid or illegal string was specified
http://docs.sencha.com/ext-js/4-1/extjs/ext-all.js
Line 18. It does not break on the error, though that option is specified. Additionally, neither my code or ext-debug.js and it's loader seem to actually call ext-all.js.
This error gets logged to Firebug's console about once per minute, which is annoying. What bothers me is that I cannot get the error to go away. Is this a FireBug bug? An ExtJS bug? Aliens? How can I debug the debugger?
I had the same problem before and I've solved it by removing a special character at the end of my JS file! (app.js I think)
It was weird, but the problem came from hidden special characters like: Zero-width non-joiner or Right-to-left mark.
Open another JS file but do not copy/paste your code there. Just write it again and check whether the problem exists or not.
And don't forget to check your data if you have some. As this article explains about the problem: http://www.ashorlivs.fr/javascript-jquery/article/an-invalid-or-illegal-string-was
For general debugging see this link http://www.sencha.com/learn/debugging-ext-js-applications/
You can also use ext-all-dev.js while in development mode.
There is another excellent tool on top of firebug, at this link http://www.illuminations-for-developers.com/
PS: I still didn't figured out how to post a comment. I guess it comes when I have more points/reputation. Hence adding it as an answer. thanks.