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

images get hidden on doing .content #61

Open
papriwalprateek opened this issue Jan 15, 2014 · 5 comments
Open

images get hidden on doing .content #61

papriwalprateek opened this issue Jan 15, 2014 · 5 comments

Comments

@papriwalprateek
Copy link

I wanted to display the content of the article as it is. That is, with image. Can this be implemented?

@pagojo
Copy link
Contributor

pagojo commented Jan 22, 2014

The documentation states that you can do this:

rbody = Readability::Document.new(body, :tags => %w[div p img a], :attributes => %w[src href], :remove_empty_nodes => false)
rbody.images

If you can't then maybe you're hitting bug #51 which has been fixed and @cantino will merge as soon as he gets some cycles :-)

@papriwalprateek
Copy link
Author

@pagojo I added your patch. But for http://www.algolist.net/Algorithms/Sorting/Bubble_sort, images are missing. Images are not returned while i do .images. While .prepare_candidates is returning it with the img tags.
@cantino

@cantino
Copy link
Owner

cantino commented Jan 23, 2014

I'm not sure, sorry. You may need to dig into the code.

On Wed, Jan 22, 2014 at 4:53 AM, papriwalprateek
[email protected]:

@pagojo https://github.com/pagojo I added your patch. But for
http://www.algolist.net/Algorithms/Sorting/Bubble_sort, images are
missing. Images are not returned while i do .images. While
.prepare_candidates is returning it with the img tags.
@cantino https://github.com/cantino


Reply to this email directly or view it on GitHubhttps://github.com//issues/61#issuecomment-33018799
.

@papriwalprateek
Copy link
Author

In http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Sorting/heapSort.htm, the images in tags is not getting displayed. I tried debugging but am not able to figure out where it is getting stripped off in the code.

@plcstevens
Copy link

The links are relative so aren't displayed because it is looking for them on your website. Whereas they are only found on the domain.

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

No branches or pull requests

4 participants