How do I get rid of paragraph tags in CKEditor from CDN - ckeditor5

I'm running CKEditor from the CDN, and when I retrieve data from Database it comes with paragraph tags, and this breaks my page structure. Any help?

I found the problem, all I had to do is use
{!! $row->uid !!}
instead of:
{{!! $row->uid !!}}

Related

Titanium - <ul> and <li> aren't recognized by the html parser

I'm using an html parser for ios: https://github.com/FokkeZB/nl.fokkezb.html2as.widget
and the html property for Android in a Ti.UI.Label
but the <ul> and <li> tags aren't recognized. Is it possible a solution?
As mentioned in the comments, ul and li tags are not supported. Only the native functionality of Attributed String is supported. If you looked at the module it links to Attributed String page at the docs.
An attributed string guide can be found here and all included types: http://docs.appcelerator.com/platform/latest/#!/guide/Attributed_Strings
That said, I recommend using either a webview, or better StyledLabel. StyledLabel is a webview with stripped functionality. You can find the module here: https://github.com/appcelerator-archive/ti.styledlabel
Then you can just set html as a property on the label instead of the text property.
Even better would be to prevent using HTML and not output HTML from the backend but instead the list itself as an array in a JSON response, and then visually build the page in the app.
Apps are not really build for HTML

How to prevent Bootstrap's glyphicon rendering to emoji (Opera, FF)?

I would like to know how to prevent showing emojis from bootstrap's glyphicons?
This
<span class="glyphicon glyphicon-tent"></span>
Renders to this (opera, moz)
I Stumbled across this:
https://apple.stackexchange.com/questions/41228/why-do-emoji-like-appear-when-i-use-safari-but-not-chrome
Unicode here :
http://www.fileformat.info/info/unicode/char/26fa/index.htm
Solution: Update your Bootstrap to the latest version.
Better alternative to avoid such problems is to use font-awesome instead of twitter bootstrap glyphicons and as a bonus you could get more icon set than glyphicons provide. But if you still want to use bootstrap glyphicons it is better to copy the unicode for that glyphicons (since glyphicons use unicode internally) and append the code as given in this answer.
use i tag insted of span like <i class="glyphicon glyphicon-tent"></i> may be it will help

Prevent Rails from escaping saved html to database

I'm trying to save the following inside a textarea to one of my models:
<iframe width="560" height="315" src="http://www.youtube.com/watch?v=Ar7PxP76o28" frameborder="0" allowfullscreen></iframe>
However this is what it actually ends up saving:
<iframe width=\"560\" \r\nheight=\"315\" src=\"http://www.youtube.com/watch?v=Ar7PxP76o28\" \r\nframeborder=\"0\" allowfullscreen></iframe>
Is there any way I can prevent it from escaping the html? I'm trying to render a youtube embeded video inside of the show view using the following code:
= #foo.content.html_safe
However the html_safe helper doesn't seem to work if the html is escaped like this. I also tried swapping out html_safe with a raw wrapper but that didn't seem to work either.
As Zabba suggested there was actually a third-party involved that was causing this issue and not Rails itself. In my case I was using the Aloha WYSIWYG editor which was sanitizing any custom HTML that I added to my form without my permission.

How can I use Twitter Bootstrap to Customize a Rails 3 file_field input

I am using twitter's Bootstrap css framework and want to make the File Upload fields look better. With Paperclip I can do something as simple as:
<%= asset_fields.file_field :asset %>
And this renders:
<input id="recommendation_assets_attributes_3_asset" name="recommendation[assets_attributes][3][asset]" type="file" >
I can add classes just not sure what makes the most sense in Bootstraps case.
thanks
I just looked around some webs and found info that it's a custom control, so bootstrap have not added style for it to the core. But, fortunately, some one did it :). Take a look a this jasny bootstrap and jquery for upload with styled bootstrap also.

How to manipulate strings in a Blogger template. Impossible?

This question is about Blogger Template manipulation. People developing/changing or manipulating Blogger templates in any way know its syntax hence can provide some input.
I write a development blog on Blogger and I've changed my blog template so posts display HTML head title differently (post name first) from default (blog name first).
But. Since I format my inline programming code words similarly to Stackoverflow (gray background mono-spaced font) and do the same when I use any of them in blog post title... I enclose such code words inside <code/> element and then I have CSS set for this particular element to add it gray background and set mono-spaced font on it. This formatting works on blog post titles and its content.
But the problem I'm having is that these <code/> tags I use are also displayed in the HTML head title (displayed in browser window title). What is even more importan is that these get displayed in web search results as well. That's even more annoying.
Default template uses <data:blog.pageTitle/> in title element, which strips out any tags, but displays all titles as Blog Name: Blog post title (Google search results are quite meaningless because blog post title gets cut off). That's why I'm using <data:blog.pageName/> instead to display just blog post title in the head, but it still has all tags and I should strip them out somehow.
Check this blog post example. Load it, and look at browser's window title bar that still has tags displayed. I want them gone.
How do I strip tags from the post title when adding it to head element?
UPDATED
ok, so far this is what i worked out:
under settings -> Title -> put a nice
use <data:blog.pageTitle/> as title;
under design -> edit html -> replace theese lines
<b:section class='header' id='header' maxwidgets='1' showaddelement='no'>
<b:widget id='Header1' locked='true' title='  (Intestazione)' type='Header'/>
</b:section>
with your custom header like
<div class="header section" id="header">
<div class="widget Header" id="Header1">
<div id="header-inner">
<div class="titlewrapper">
<h1 class="title">
aSeptik Site</h1>
</div>
<div class="descriptionwrapper">
<p class="description">
<span>
</span>
</p>
</div>
</div>
</div>
</div>
<title> will result from:
jQuery <em>"scroll into view"</em> plugin (with an additional <code>":scrollable"</code> selector filter)
to
: jQuery "scroll into view" plugin (with an additional ":scrollable" selector filter)
hope this help, demo http://aseptik.blogspot.com/2011/02/jquery-scroll-into-view-plugin-with.html
try with a little bit of javascript in your <body> like this
<script type='text/javascript'>
document.title = document.title.replace(/(<([^>]+)>)/ig,'');
</script>
</body>
copy and past as is don't convert entities,
DEMO: http://aseptik.blogspot.com/2011/02/jquery-scroll-into-view-plugin-with.html
although, i'm not sure this is the
right solution for you since spiders
usually avoid js execution, and i
don't know how "html tags in the title"
affects the search results.