Comments (2)
I believe it should work with existing HTML markup, or markdown — which is
why I made the changes and submitted the patches I did. If you're working
on anything like a CMS or blog software that's the only way to go. User
input in the wild is unpredictable stuff.
On Wed, Aug 13, 2014 at 6:39 PM, zrisher [email protected] wrote:
Hi all,
I notice that there are a lot of areas where this would break existing
HTML markup (i.e. any link where the src= one of the supported urls). I see
related pull requests @subimage https://github.com/subimage #116
#116, #114
#114 that would fix this in
certain situations. But if this is really meant to work with anyone's
existing markup, and you need URL filters to only target text, some
architectural changes (possibly involving parsing content into nodes via
Nokogiri and then only running filters on text) would be easier and more
DRY than adding the conditions onto every regex. That's a big change in
functionality.The content of README.md seems to indicate that this is meant to be used
as either a complete filter on very simple content fields (without much
previous markup, which gets escaped), or as a simple filter called
individually when you know you need it (once you've isolated exactly the
text that needs changing).I love the respository - it works very well for my project when used in
the latter way. But if it's meant to work on all prexisting markup it needs
some changes. If not, perhaps this could be indicated in the readme so
similar issues and pull requests aren't raised.@dejan https://github.com/dejan, could you let us know if you see this
repository eventually fully supporting pre-existing markup? Or should we
plan on calling filters on isolated sections in those cases?—
Reply to this email directly or view it on GitHub
#122.
seth @ subimage llc
http://subimage.com
from auto_html.
With the changes made today, this repo no longer meets any of my use cases for it (i.e. the various social links in Rails). So I won't be using it, and if I'm the only one who had issues with running this over existing HTML markup, this issue can be closed.
from auto_html.
Related Issues (20)
- Soundcloud filter HOT 2
- Create an org for this gem? HOT 4
- Use this w/o DB worries. No strings attached. HOT 1
- Naming Convention HOT 1
- NameError: uninitialized constant HTML after upgrading to Rails 4.2.4 HOT 9
- Add facebook video filter HOT 3
- vimeo shows the link only HOT 1
- With new api is there a way to use old syntax auto_html_for or equivalent? HOT 1
- Why was the documentation changed? HOT 1
- Will Facebook videos be incorporated? HOT 1
- Is there a way to create thumbnail images from the video URL? HOT 2
- undefined method `auto_html_for' HOT 3
- In case of image + emoji it is not working HOT 2
- What happened to Rails integration? HOT 4
- will_paginate-bootstrap is broken auto_html HOT 3
- Rails5 deprecation warning HOT 2
- youtube_js_api returns 404 HOT 1
- undefined method `add_filter' for AutoHtml:Module (NoMethodError) HOT 1
- Where can I find the emoji image library? HOT 1
- Want to be able to autolink short domains HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auto_html.