diff --git a/NEWS b/NEWS index cd1453d..29448c4 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +1.3.4: April 24, 2008 + * Better support for RSS feeds of notebooks with unicode names. + * Now dynamically altering RSS feed link when notebook is renamed. + 1.3.3: April 22, 2008 * RSS subscription support for each wiki notebook. diff --git a/static/js/Wiki.js b/static/js/Wiki.js index 832c71f..a720ab6 100644 --- a/static/js/Wiki.js +++ b/static/js/Wiki.js @@ -1942,6 +1942,14 @@ Wiki.prototype.end_notebook_rename = function () { document.createTextNode( new_notebook_name ) ); + // rename the notebook within the rss link (if any) + var notebook_rss_link = getElement( "notebook_rss_link" ); + if ( notebook_rss_link ) { + divider = "?rss¬ebook_name="; + pieces = notebook_rss_link.href.split( divider ); + notebook_rss_link.href = pieces[ 0 ] + divider + escape( new_notebook_name ); + } + // if the name has changed, then send the new name to the server if ( new_notebook_name == this.notebook.name ) return; diff --git a/view/Link_area.py b/view/Link_area.py index f10e9da..11b7cbe 100644 --- a/view/Link_area.py +++ b/view/Link_area.py @@ -35,7 +35,7 @@ class Link_area( Div ): A( u"subscribe to rss", href = u"%s?rss" % notebook_path, - id = u"rss link", + id = u"blog_rss_link", title = u"Subscribe to the RSS feed for the Luminotes blog.", ), A( @@ -48,7 +48,7 @@ class Link_area( Div ): A( u"subscribe to rss", href = updates_path, - id = u"rss link", + id = u"notebook_rss_link", title = u"Subscribe to the RSS feed for this notebook.", ), A( diff --git a/view/Main_page.py b/view/Main_page.py index b293f4c..f2e8943 100644 --- a/view/Main_page.py +++ b/view/Main_page.py @@ -76,7 +76,7 @@ class Main_page( Page ): updates_path = u"/notebooks/updates/%s?rss&%s" % ( notebook.object_id, - urlencode( [ ( u"notebook_name", notebook.name ) ] ), + urlencode( [ ( u"notebook_name", notebook.name.encode( "utf8" ) ) ] ), ) if notebook.name == u"Luminotes": diff --git a/view/Updates_rss.py b/view/Updates_rss.py index a2e62f4..1b04e94 100644 --- a/view/Updates_rss.py +++ b/view/Updates_rss.py @@ -41,7 +41,7 @@ class Updates_rss( Rss_channel ): def note_link( notebook_id, notebook_name, note_id, revision, https_url ): query = urlencode( [ ( u"notebook_id", notebook_id ), - ( u"notebook_name", notebook_name ), + ( u"notebook_name", notebook_name.encode( "utf8" ) ), ( u"note_id", note_id ), ( u"revision", unicode( revision ) ), ] )