[PR #746] [MERGED] Fixes for html wrapping and encoding #2568

Closed
opened 2025-11-26 23:21:08 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/746
Author: @mpbw2
Created: 2/28/2020
Status: Merged
Merged: 2/28/2020
Merged by: @mpbw2

Base: masterHead: bugfix-htmlformatting


📝 Commits (1)

  • 45b60d1 Fixes for html wrapping and encoding

📊 Changes

1 file changed (+27 additions, -2 deletions)

View changed files

📝 src/App/Utilities/PasswordFormatter.cs (+27 -2)

📄 Description

  • Added a (hacky) fix to get per-char wrapping working properly with special chars by adding a zero-width space char after every char (these are then treated as a "safe" place to wrap by the system, restoring the smoother wrapping experience we had pre-colorized passwords)

  • Wrapped the spans in a div on iOS. Without it, iOS was visibly displaying the zero-width space char. Android refuses to keep divs on a single line (ignoring the inline* attr) which is why we restrict this to iOS.

  • Added HttpUtility.HtmlEncode() on special chars so < > etc. are displayed properly


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/746 **Author:** [@mpbw2](https://github.com/mpbw2) **Created:** 2/28/2020 **Status:** ✅ Merged **Merged:** 2/28/2020 **Merged by:** [@mpbw2](https://github.com/mpbw2) **Base:** `master` ← **Head:** `bugfix-htmlformatting` --- ### 📝 Commits (1) - [`45b60d1`](https://github.com/bitwarden/android/commit/45b60d1f9b8e0766d681421698fa0fb16a0c7e19) Fixes for html wrapping and encoding ### 📊 Changes **1 file changed** (+27 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Utilities/PasswordFormatter.cs` (+27 -2) </details> ### 📄 Description - Added a (hacky) fix to get per-char wrapping working properly with special chars by adding a zero-width space char after every char (these are then treated as a "safe" place to wrap by the system, restoring the smoother wrapping experience we had pre-colorized passwords) - Wrapped the spans in a div on iOS. Without it, iOS was visibly displaying the zero-width space char. Android refuses to keep divs on a single line (ignoring the inline* attr) which is why we restrict this to iOS. - Added `HttpUtility.HtmlEncode()` on special chars so < > etc. are displayed properly --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-26 23:21:08 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#2568