Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove html tags from job description #78

Open
ksk5280 opened this issue Jun 3, 2016 · 7 comments
Open

Remove html tags from job description #78

ksk5280 opened this issue Jun 3, 2016 · 7 comments

Comments

@ksk5280
Copy link
Contributor

ksk5280 commented Jun 3, 2016

Investigate best way to remove html tags from the job description before rendering on the view.

The rails view uses the sanitize method: https://github.com/LookingForMe/lookingfor/blob/d3b65541264aec1b7f76ef1bac988b379a1f3a04/app/views/jobs/show.html.erb#L21

http://api.rubyonrails.org/classes/ActionView/Helpers/SanitizeHelper.html

Would it make more sense to remove the tags from the API endpoint or to try to remove them on the front-end?

@rrgayhart @NickyBobby @hhoopes

@erinnachen
Copy link
Contributor

@ksk5280 Do you have a job in particular that has those html tags in them? It may be helpful to see which service those jobs are coming from.

@brianrip
Copy link

brianrip commented Jun 3, 2016

@NickyBobby @erinnachen I am going to try and address this on the front end for now. I would prefer to keep the html tags in the JSON so that I can utilize them to display the content.

@brianrip
Copy link

brianrip commented Jun 4, 2016

@NickyBobby I was able to take care of the HTML elements on my end and utilize them for organization.

@ksk5280
Copy link
Contributor Author

ksk5280 commented Jun 7, 2016

Since Brian was able to use the tags on the front end, I'm going to close this issue.

@ksk5280 ksk5280 closed this as completed Jun 7, 2016
@ksk5280 ksk5280 reopened this Jun 7, 2016
@ksk5280
Copy link
Contributor Author

ksk5280 commented Jun 7, 2016

I'm reopening this issue because I don't think that the way this is done on the front end is necessarily the best solution or at least not a complete solution. The styling on the job listings is all over the place.
I agree with Brian that the tags are useful to help with styling, but perhaps there is a way to make the styling more uniform or sanitized?

In response to Erinna's comment above, the services that the tags are coming from are Stack Overflow and Authentic Jobs. We work remotely does not have them.

Another question is why are the Stack Overflow and Authentic Jobs description saved with tags while the We Work Remotely descriptions are not? Do we want to/can we change this so that the We Work Remotely descriptions also have the html tags in them?

@rrgayhart
Copy link
Contributor

^ Good thoughts. Looks like using NokoGiri on the back end to maintain structure might be a viable option - or in the meantime, you could just strip the tags http://stackoverflow.com/questions/7414267/strip-html-from-string-ruby-on-rails

@ghost
Copy link

ghost commented Jul 21, 2016

Hey @s-espinosa, would it make sense to tackle this right now? I don't want the front-end team to be working on something that requires this part from the back-end project and then mess everything up. Let me know whether or not this is a good issue to tackle whenever you can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants