English subtitles

← Bonus Question Page History - Web Development

Get Embed Code
4 Languages

Showing Revision 5 created 05/24/2016 by Udacity Robot.

  1. Okay. A little bit more. I'm going to add a bonus problem to this final.
  2. This is not required but if you do it you'll be eligible for a higher level of distinction in the class,
  3. and again we'll enumerate all that in the instructor comments.
  4. This bonus problem, and you may have seen this link in the demo I gave,
  5. is to add a page history to each page.
  6. This history link--implement this.
  7. When we click this history link, the URL changes to _history and then URL.
  8. In this case, we're going to front page it with a slash
  9. and you can see all the previous versions of a page.
  10. Remember, in the original demo of the problem, I just had it say, "Welcome to the Final"
  11. and then I edited the page to say, "Your task is to build a wiki."
  12. I'm just including the first 100 characters or so of a page.
  13. I can click on view of either of these links to view older versions of a page.
  14. This is the most recent version. If I want to edit a page, I can still click edit.
  15. Notice how the URL changes to _edit.
  16. If I add this other statement and I click save, you can see the page is updated.
  17. And if I were to click on history, you can see that there's a new version at the top here.
  18. This might be a little tricky.
  19. But for those of you who can figure it out, this will be a really good exercise.
  20. Let's go back to that other URL we are looking at before--new page.
  21. This was a page we added in the first part of the assignment.
  22. If I were to click history on this page, we can see that this also has two versions.
  23. The original version I made--Here's a new page--
  24. and then the other version that had some HTML in it.
  25. Now you can see here of course in the history page, the HTML is escaped,
  26. and when we view the HTML is unescaped causing it to behave exactly like HTML.
  27. We are not going to test on that because it's up to you to decide on your wiki
  28. whether or not you want to trust your users not to put a bunch of garbage on your page or not.
  29. You know that's a decision you can make as a website owner, and we won't grill you on it.
  30. But of course in editing, the text area form should escape things properly if they're in there.
  31. so it can be edited properly, and that's all we've got.
  32. When you have that working, submit your URL here and good luck.