Is there some way or some config setting to disable the automatic parsing of an url in CKEditor?
When I type wwww.google.com, it's automatically parsed to
wwww.google.com
How to disable this automatic 'url to anchor' parsing?
Related
Is there any default media type when the query is not specified with any supported media types in RESTCONF ?
No. There is no standard default. This is server implementation dependent, so do not rely on it.
From draft-ietf-netconf-restconf-17, Section 5.3, Message Encoding:
The server MUST support the "Accept" header field and "406 Not
Acceptable" status-line, as defined in [RFC7231]. The response
output content encoding formats that the client will accept are
identified with the Accept header field in the request. If it is not
specified, the request input encoding format SHOULD be used, or the
server MAY choose any supported content encoding format.
If there was no request input, then the default output encoding is
XML or JSON, depending on server preference. File extensions encoded
in the request are not used to identify format encoding.
And from draft-ietf-netconf-restconf-17, Section 7.1, Error Response Message:
The client SHOULD specify the desired encoding(s) for response
messages by specifying the appropriate media-type(s) in the Accept
header. If the client did not specify an Accept header, then the
same structured syntax name suffix used in the request message SHOULD
be used, or the server MAY choose any supported message encoding
format. If there is no request message the server MUST select
"application/yang-data+xml" or "application/yang-data+json",
depending on server preference.
The final RFC stood by the draft, just as #predi said:
On Message Encoding, Section 5.2:
If there was no request input, then the default output encoding is
XML or JSON, depending on server preference. File extensions encoded
in the request are not used to identify format encoding.
And Error Message Response, Section 7.1
If the client did not specify an "Accept" header, then the same
structured syntax name suffix used in the request message SHOULD be
used, or the server MAY choose any supported message-encoding
format. If there is no request message, the server MUST select
"application/yang-data+xml" or "application/yang-data+json",
depending on server preference.
On Rails 5, all requests includes an unique identifier accessible on application and displayed on HTTP response headers, called "X-Request-Id".
This identifier is very useful for debugging and logging, but I'm having trouble with this in a very old web client.
I tried to clear the header but it did not work.
response.headers['X-Request-Id'] = nil
How can I remove this information from headers?
You can disable it by adding this line in your config/application.rb file:
config.middleware.delete ActionDispatch::RequestId
You can disable this header information, setting by nil this request attribute.
request.request_id = nil
Trying to send HTML content in a SendGrid email header. I am getting drop email. The error is "REASON: Invalid SMTPAPI header"
This is my email template code
<%body%>
--|ALERT_MESSAGE|--
Here is the content I want to send (ROR string)
content = "<p>The system following info. [#{message}] <a href='#{url}'>#{url}</a></p>"
Here is my header code (self in this case is the header)
self.add_category("System Email")
self.add_filter('templates', 'enable', 1)
self.add_filter('templates', 'template_id', 'sdfs-f8fd6029')
self.add_substitution('--|MESSAGE|--', [content])
self.set_tos(SENDGRID_EMAILS)
Even if you are using a template, you need to specify some kind of body in the actual message, so that means you need to pass the html parameter i your request. This is an artifact due to transactional templates being added to the existing endpoint. A new mail sending endpoint is in the works that will not require text or html to be defined if a template is used.
I am trying to added a non-english language for a test using capybara and poltergeist. I have tried:
page.driver.headers = { 'HTTP_ACCEPT_LANGUAGE' => 'pt-BR' }
But that is not working. On the server side, 'HTTP_ACCEPT_LANGUAGE' is always 'en-US'. I have even tried adding another arbitrary header but that isn't coming through on the server side. It seems like poltergeist's header setting doesn't seem to work.
I expected that the right header to set was the same as retrieving in rails but HTTP_ACCEPT_LANGUAGE is not a valid http header (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). It is specific to rails.
I needed to do:
page.driver.headers = { 'ACCEPT-LANGUAGE' => 'pt-BR' }
I am following this example to get JSONP data from remote server. jQuery append its own callback function while sending request like
http://url.com?callback=jQuery17107389513931702822_1332765044455&_=1332765051700
But the source is replying JSONP data in a fixed format as REPYL$queryString({"data":"abc"}) where queryString is the string for which reply is generated.
How to customize the options to support my own callback name? The error which I am getting right now is
Uncaught ReferenceError: REPLY$querystring is not defined.
UPDATE
setting which worked for me are:
jsonp:false,
jsonpCallback:"CALL_BACK_NAME",
Use the jsonp setting in the .ajax request of the example you are using:
jsonp
Override the callback function name in a jsonp request. This value will be used instead of 'callback' in the 'callback=?' part of the query string in the url. So {jsonp:'onJSONPLoad'} would result in 'onJSONPLoad=?' passed to the server. As of jQuery 1.5, setting the jsonp option to false prevents jQuery from adding the "?callback" string to the URL or attempting to use "=?" for transformation. In this case, you should also explicitly set the jsonpCallback setting. For example, { jsonp: false, jsonpCallback: "callbackName" }
jsonp: 'YOUR-CALLBACK-NAME'
See the .ajax documentation