Skip to content

Commit

Permalink
Can remove a Bible with trailing spaces in its name
Browse files Browse the repository at this point in the history
  • Loading branch information
teusbenschop committed Dec 28, 2023
1 parent fd81656 commit eb5c682
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bb/manage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ std::string bible_manage (void* webserver_request)
for (const auto& bible : bibles) {
pugi::xml_node li_node = document.append_child ("li");
pugi::xml_node a_node = li_node.append_child("a");
const std::string href = filter_url_build_http_query ("settings", "bible", bible);
const std::string href = filter_url_build_http_query ("settings", "bible", filter_url_urlencode(bible));
a_node.append_attribute("href") = href.c_str();
a_node.text().set(bible.c_str());
}
Expand Down
3 changes: 1 addition & 2 deletions bb/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ string bible_settings (void * webserver_request)
if (bible.empty()) bible = request->post ["val1"];
bible = access_bible::clamp (request, bible);
view.set_variable ("bible", filter::strings::escape_special_xml_characters (bible));
view.set_variable ("urlbible", filter_url_urlencode(filter::strings::escape_special_xml_characters (bible)));


// Whether the user has write access to this Bible.
Expand Down Expand Up @@ -315,8 +316,6 @@ string bible_settings (void * webserver_request)
} else {
view.enable_zone ("server");
}




page += view.render ("bb", "settings");
Expand Down
2 changes: 1 addition & 1 deletion bb/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h1>translate("Bible") ##bible##</h1>
<!-- #BEGINZONE manager -->
<!-- #BEGINZONE write_access -->
<!-- #BEGINZONE server -->
<p><a href="manage?delete=##bible##">translate("Delete this Bible")</a></p>
<p><a href="manage?delete=##urlbible##">translate("Delete this Bible")</a></p>
<p><a href="/resource/bb2resource?bible=##bible##">translate("Convert to USFM resource")</a></p>
<!-- #ENDZONE server -->
<!-- #ENDZONE write_access -->
Expand Down
1 change: 1 addition & 0 deletions help/changelog.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<h1>ChangeLog</h1>

<p>5.1.010: Can remove a Bible with trailing spaces in its name.</p>
<p>5.1.010: Support for USFM marker \sup for superscript text.</p>
<p>5.1.009: Downloading exports in the Windows app works again.</p>
<p>5.1.009: Finding text in the Windows app user interface works again.</p>
Expand Down

0 comments on commit eb5c682

Please sign in to comment.