SharePoint search box not encoding special characters - search

We have a modern SharePoint site. We are using pnp search results webpart for displaying search results in a page. In search settings we are using this customized search results page instead of using out of box search.aspx page
Issue:
When we are entering some special characters like "C++" keyword in search box, these characters are not encoded and hence results are not coming properly.
It is supposed to come like
/Search.aspx?q=C%2B%2B
But it is coming as
/CustomReults.aspx?q=C++
I presume if we can get the query like below, it will work. But how to get that. Need help badly..
/CustomReults.aspx?q=C%2B%2B

Related

Roku SceneGraph with Search Functionality

I'm creating a Roku app in SceneGraph and trying to near duplicate the search functionality I had using the old SDK. I'm stuck at only being able to display the mini keyboard. I'm trying to add buttons via buttongroup (i.e., Search, Cancel) but having two issues:
Not sure how to get the text string that's typed into the mini keyboard and store that in a variable or field so I can perform the search on it.
How to create a Search button and give it focus when user is ready to search for the string they entered.
Any help would be appreciated. Thanks.
SGDEX (Scenegraph Developer Extensions) is what you need. They have a view called "SearchView". Look it up.
Also...
RALE (Roku Advanced Layout Editor) has good search options. - I have been unable to find a decent Search sample. It would be cool if we could export the source code from RALE.
However if you haven't tried RALE. You could upload your script, then add search to it.

Google Sitelinks Search Box

For some reason, a search for our company name (“hometalk”) does not produce the search box in the results (even though we do have sitelinks).
We are adding schema markup as outlined here, but we're not sure about:
Will adding the code make the search bar appear (or at least increase the chances), or is it only going to change the functionality of the search box (to on-site search) for results that are already showing a search bar?
It is only going to change the functionality of the search box (to on-site search) for results that are already showing a search bar.
As stated here: https://developers.google.com/webmasters/richsnippets/sitelinkssearch
Search box not displaying? The sitelinks search box appears only for navigational queries and when relevant for users. Google
algorithms use a variety of factors to determine when the box appears,
including the information on the site and different types of
navigational queries from Search users.

Viewing Word Documents inside Browsers

I'm searching for some kind of Programm / Java Applet / ActiveX Control or magic spell to view Word / Excel Documents inside Browsers (Browser independent would be the best case, but IE only ist just fine).
I don't want to open Word itsself inside a frame, because that gives users the false impression that they can edit and save the document i just want to display its contents.
I also found solutions which converts the word document to pdf first, but i can't do this due to some security restrictions on the environment i'm working on.
This can help when those proprietary file formats can first be converted to ODF (for example by LibreOffice/OpenOffice.org): http://webodf.org/
(I will not comment on "security restrictions" and using Microsoft software ...)

How to search a PDF in Acrobat Reader AND jump to a certain page via parameter?

We are using lucene within a web application to search in a great number of PDF documents.
The workflow is like this:
A user enters a search term
A list of search results is presented to the user.
Each search result represents one PDF document and shows the user on which page the search term was found. Each of these pages is represented as a hyperlink.
If the user now clicks on such a hyperlink, he directly jumps to that page.
But now the user has the problem that the search term isn't highlighted on the page. Therefore the user has to look on his own to find the search term on the page.
What we wanted is a way to highlight the search term on the specific page in the PDF.
The open parameters for Acrobat Reader allow for either searching a PDF document (with hit highlighting) OR jumping to a specific page. But the combination of both parameters - which we would need - doesn't work.
Does anyone have an idea how jumping to a page and highlighting a search term in a PDF document could work?
I had a look at the Acrobat SDK but don't see how we can use it (it's terribly documented).
acrobat uses a plugin to hilite terms, and requires a fdf stream to indicate the words to hilite.
See here for pointers:
support.dtsearch.com/dts0152.htm
update:
assuming you know the page# and word# on the page to hilight, here is one way to do it:
On web page:
<iframe id="acroframe" src="pdfpage/example.pdf#xml=http://example.com/hilite.aspx?hilite=8e3302ee-ff88-41ee-bdfb-9e8df87cc3ad&toolbar=1&navpanes=0&statusbar=0&view=FitH">
</iframe>
The PDF will appear in the frame, it will show the toolbar, hide the navpane & status bars and fit page to horizontal. Then it will query the web site to get the xfdf data for hilighting: http://example.com/hilite.aspx?hilite=8e3302ee-ff88-41ee-bdfb-9e8df87cc3ad
Here I used a guid key that I previously saved in the session with the hilite xfdf value.
The hilite.aspx page will return something like the following to hilite words in the document:
<XML>
<Body units=characters color=#ff00ff mode=active version=2>
<Highlight>
<loc pg=15 pos=3583 len=5>
</Highlight>
</Body>
</XML>
This will hilight 5 chars on page 15 starting at position 3583. (note: xfdf is not real "XML" despite the similarity)
Note that acrobat reader will have to have the "Enable search highlights from external highlight server" option checked in preferences.
Sorry might not be an answer, but a workaround could be to covert the PDF to html and use Lucene highlighter (similar to what Google does)
You'd have to write a snippet of Javascript to get the behavior you are looking for.

How to display line breaks in SharePoint comment history field

We have a SharePoint list setup with history enabled so the Comments field keeps all the past values. When it displays, the Comments field is void of all line breaks. However, when SharePoint e-mails the change to us, the line breaks are in there. The Description field also shows the line breaks.
So, something must be stripping out the line breaks in the read-only view of the Comments field.
Any idea on how to customize that so it retains the formatting in the detail view of the SharePoint list item?
Update: the stock pages with this behavior are
/EditForm.aspx
/DispForm.aspx
What are you using to view the list? A default SharePoint view (AllItems.aspx?), or a DataFormWebPart? Something else?
If you can customize the page that displays this list in SharePoint Designer, make sure this field is set to display "Rich Text" and not just "Plain Text".
If this is the cause of your problem, then another symptom you might see is that certain symbols are displayed as their HTML codes (e.g. "&" as "&").

Resources