-
Notifications
You must be signed in to change notification settings - Fork 15
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 images from posts containing a photo #52
Comments
Encountered two blockers working on this:
<div class="h-entry"><p class="e-content p-name">Hello World <img src="example.jpg"></p></div> {
"type": [
"h-entry"
],
"properties": {
"name": [
"Hello World http://example.com/example.jpg"
],
"content": [
{
"html": "Hello World <img src=\"http://example.com/example.jpg\">",
"value": "Hello World http://example.com/example.jpg"
}
],
"photo": [
"http://example.com/example.jpg"
]
}
}
For example, XRay sees this object and runs the HTML sanitizer on the HTML value: {
"html": "Hello World <img src=\"http://example.com/example.jpg\">",
"value": "Hello World http://example.com/example.jpg"
} This means I can't remove the |
Another question/problem is what should I do in the case where the <div class="h-entry"><p class="e-content p-name">Hello World <img src="example.jpg" class="u-photo" alt="An Example Photo"></p></div> {
"type": [
"h-entry"
],
"properties": {
"name": [
"Hello World An Example Photo"
],
"photo": [
"http://example.com/example.jpg"
],
"content": [
{
"html": "Hello World <img src=\"http://example.com/example.jpg\" class=\"u-photo\" alt=\"An Example Photo\">",
"value": "Hello World An Example Photo"
}
]
}
} (example) This is filed as an issue on the parsing spec here: microformats/microformats2-parsing#16 Ideally the parsing spec would not have included that alt text in the plaintext values in the first place. |
Current status: blocked. Breaking this out into separate issues so they can be tracked. |
whoops, not actually closing this because I haven't committed the code that actually does that logic yet. |
An example feed where a |
Discussion from IRC:
The text was updated successfully, but these errors were encountered: