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

"Secret" data for the block #2

Open
danielbachhuber opened this issue Feb 2, 2017 · 4 comments
Open

"Secret" data for the block #2

danielbachhuber opened this issue Feb 2, 2017 · 4 comments

Comments

@danielbachhuber
Copy link

Just wanted to log this while I'm thinking of it.

The HTML comment storage paradigm doesn't permit "secret" data to be entered by the end user, and then be interpreted / rendered differently by the presentation layer.

@westonruter
Copy link

Secret data could be like a private RSS feed URL?

@danielbachhuber
Copy link
Author

Secret data could be like a private RSS feed URL?

Right, as one example. API key as another example.

@aduth
Copy link
Owner

aduth commented Feb 2, 2017

Yeah, this is a good question. An example could be a Gravatar block where the email address from which the image hash is generated shouldn't really be made available in the markup of the page.

Two options I could imagine:

  • As part of front-end content filtering, strip all block comments
  • Set expectations that private data is not to be stored. Alternatives could include using shortcodes instead, though might either defeat the purpose of a comment block or at least be less convenient.

@danielbachhuber
Copy link
Author

I had another idea while I was out: have a lightweight API for storing the actual data in post meta, and only including a reference to the data in the HTML comment.

While this would violate the principle of storing all user data in post_content, it does open the door to storing data in post meta that doesn't make sense in a HTML comment.

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

3 participants