Comments (2)
Hello again,
as there is a documented CVE in feedgen version 0.8 [0] i wonder when there will be a reaction to this. Would it help to propose a fix and submit it as a merge request?
regards
[0] https://nvd.nist.gov/vuln/detail/CVE-2020-5227
from python-feedgen.
You are absolutely right that this is not great. Unfortunately, that's a design decision from right at the beginning of the project which isn't easy to fix. The methods always return the internal storage structure. This may be a string (if only a string is being stored), but will often be a dictionary.
For example, this:
fe.summary('description')
fe.source('http://example.com', 'Example')
fe.content('Some text')
print("Summary: {}".format(feed.entry()[0].summary()))
print("Source: {}".format(feed.entry()[0].source()))
print("Content: {}".format(feed.entry()[0].content()))
will result in:
Summary: {'summary': 'description'}
Source: {'url': 'http://example.com', 'title': 'Example'}
Content: {'content': 'Some text'}
Summary allows you to store a type as well as the summary itself. Returning only the summary would mean that there is no way to see what type is stored for the summary, which then would be inconsistent with the other methods.
That being said, I'll try to add changes like these to release notes.
from python-feedgen.
Related Issues (20)
- AttributeError: 'PodcastExtension' object has no attribute 'itunes_duration' HOT 5
- Non-Zero Integer for enclosure length causes type error
- Dead Project? HOT 3
- Add typehints HOT 1
- "Health & Fitness" incorrect & HOT 1
- How can I add multiple lines into description HOT 1
- please give a valid example of using extention media HOT 1
- WebSub Support? HOT 2
- What's the best way to determine subscriber counts? HOT 1
- Only href gets rendered for links HOT 2
- w
- 'FeedEntry' object has no attribute 'source' HOT 3
- 'deprected' mispelled HOT 1
- Can't have entry-specific pubDate HOT 1
- Making "generator" element truly optional HOT 1
- Adding description as summary fails to generate Atom HOT 1
- Missing iTunes tags HOT 1
- Include tests in release tarball
- Unable to set categories 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 python-feedgen.