Search Results for "sanitize-method-in-rails"
Lessons
Forum Threads

How to translate and localize apps with Rails Internationalization (18n) Discussion
17
General
This was really great, thank you! Can you provide a link as to what you need to sanitize the variable you passed in, name? Looking forward to the next episode!

How do I override the default link_to helper?
3
Rails
I accept a lot of user input links and output them as anchor tags. As a result, I'm worried that there may be cases of users trying to inject Javascript into the href attribute.
I would like to ov...
Chris Oliver replied
Solved

I'm lost and can't find the way out
18
Rails
So I'm in the middle of this project and I thought I could figure it out on my own, but it appears I am in over my head here. So any advice/help you can give me would be great.
Basically I'm tryi...
Andrea Fomera replied
Solved

Thousand separator and Number formating
10
General
Something as simple as formatting a number in form field with thousand separators and currency symbol is driving me crazy! Something that should be simple to do and more importantly should be part...

Handling Subdomains and Multitenancy From Scratch Discussion
55
General
This is my favorite episode thus far. The expansion on top of Rails is so intuitive, never thought how useful separating accounts from users would be.Hopefully there's a simple answer to this. When...
Robert Ault replied

Custom Attribute Serializers with ActiveRecord in Rails Discussion
7
General
This feels much simpler for custom value objects and surprisingly more straightforward than the official way, i.e. registering a new Active Model type.
Great video, thank you.
Adrián Mugnolo replied

How do I create an app with Urls like 'https://username.website.com/' instead of 'https://website.com/username/' ?
17
Rails
Hello everyone,
I searched but didn't find anything and was hoping like I said in the title of this subject, to find a way to get the url displaying a user's profile of a client's app to be like u...
Chris Oliver replied
Solved

Devise: Add a select to my signup form
14
Rails
Hi all, me again! haha
So i have got my app working as i want so far. All is good and i am picking up Rails really quickly thanks to GoRails.
I am however a little stuck, I can't seem to add in a ...
Jacob Montgomery replied

Protecting from XSS with Sanitize Discussion
7
General
Thanks Chris! I'm building an app and just realized I'm not sanitizing user generated urls. Thanks for the helpful tips.
octanepower replied

Rails::HTML Sanitizer: mimic CKEDITOR allowedContent configuration, by specifying attributes and CSS classes for each tag
0
General
Let's say that I want to sanitize user generated HTML written by CKEDITOR or something similar.
CKEDITOR has a really nice hash-like syntax for allowing content:
```
config.allowedContent = {
...
TL posted

How can I render \\n as newlines in <pre><code> elements?
2
Ruby
I need to render the post's body as HTML, but as it is given to me, it has some "\\n", "\\r" and "\\t" characters. How can I replace them with newlines, carriage return and tab characters respectiv...
Solved

Embeddable Javascript Comments Widget Models - Part 1 Discussion
6
General
This is perhaps a bit of a newbie question but I wanted to ask your opinion on what are the things I would consider usually when it comes to using the approach you outlined in the video to sanitize...
Karl McCollester replied

Embeddable Javascript Comments Widget Models - Part 1 Discussion
0
General
Hello everyone,,
This is perhaps a bit of a newbie question but I wanted to ask your opinion on what are the things I would consider usually when it comes to using the approach you outlined in the ...
Konhaivo12 posted

Error: uninitialized constant HTML::Pipeline::SyntaxHighlightFilter::Pygments when installing html-pipeline
5
General
I am getting an error:
`uninitialized constant HTML::Pipeline::SyntaxHighlightFilter::Pygments`.
my Gemfile shows:
``` ruby
# markdown in comments
gem 'html-pipeline', '~> 1.11.0'
gem 'github-...
Lauro replied

[Vue/Rails] Rich Text Editor - Possible XSS and how to safeguard?
1
General
So I'm working on an app where the Admin dashboard is built on Vue and backend is Rails. There are parts where the Admin can update some Rich Text content, and it will be rendered by Rails. But in ...
Chris Oliver replied

simple_format and Embedded content
0
Rails
I currently have a part of my website where people can submit user generated articles. I use simple_format to retain the layout.
e.g.
`<%= simple_format(@post.content %>`
As more and more ...
Tony posted

Preventing XSS in a Rails app, accepted architecture?
0
Rails
I've read and understand the great ways Rails sanitizes data when going from server to client, but I have a question that I would love to get some guidance/input on.
Recently it was discovered the...
Mark Kadlec posted

Group Chat with ActionCable: Part 6 Discussion
8
General
Wow! This was an amzing guide!
saribaev021 replied

Move a Legacy App in Production to a local Development Environment
6
Rails
I'm working with a legacy Rails app (Ruby 1.9.2 and Rails 3.2.8). The app only exists in production. There isn't a development environmnt or repo I can use to setup my dev environment. I'm on an OS...
Chris Oliver replied
Solved

Errors when doing Bundle Update
0
General
When I do bundle update I get:
Bundler could not find compatible versions for gem "ruby":
In Gemfile:
ruby (~> 3.0.0)
thredded (~> 0.16.13) was resolved to 0.16.16, which depends ...
Brandon Morales posted