Forum Discussion

joeRinehart's avatar
joeRinehart
New Contributor
3 months ago
Solved

1Password Chrome extension is incorrectly manipulating <code> blocks

The latest 1Password Chrome extension is incorrectly manipulating the DOM within <code> blocks on static pages. It looks it's using prism.js to try to add syntax highlighting to <code> blocks on the entire page. If you're using a static site generator to highlight code with a different library, it causes the display to break.

Example: mkdocs, a popular documentation tool

If you view the documentation for customizing Mkdocs material (https://squidfunk.github.io/mkdocs-material/customization/) with the extension enabled, you'll see that the YAML example at the top is not highlighted (it should be). 

Under the hood, if you inspect its DOM, you can see that it's been rewritten with prismjs classes.

If you disable the extension, it is highlighted:

This is likely to impact a number of documentation sites in the tech community.

  • Hey everyone! I want to thank everyone who called our attention to this and explain what happened and what we’re doing about it.

    What happened: Prism.js is a syntax-highlighting library we use for our Labs Snippets feature. While optimizing our build to reduce bundle size, we unintentionally bundled Prism.js into the extension in a way that caused it to run on pages where it shouldn’t, which interfered with code formatting on certain sites. We apologize for the inconvenience this caused.

    What we’re doing about it:  We’ve completed the fix and submitted it to the Chrome Web Store, along with Firefox, Edge, and our other supported extension storefronts. Rollout timing depends on each store’s review process, but we expect it to land over the next few days.

    We want to emphasize that vault security was not impacted. At 1Password, protecting our customers’ privacy, passwords, and credentials is our highest priority.

    Check out our postmortem covering what went wrong, the timeline, and the concrete changes we’re making to how we build and release future browser extension updates: Incident Postmortem - 1Password Browser Extension Code Syntax Rendering Issue

54 Replies

  • rhukster's avatar
    rhukster
    New Contributor

    I've just spent hours trying to track down this very issue with a new server-side syntax highlighting plugin i'm writing.  It was working fine, then a couple of days ago, noticed the behavior where it was highlighting correctly, then quickly rewrites to this monochrome version. I thought some other JS was injecting prism.js, and eventually got desperate enough to disable plugins.. I was shocked to find it was 1password, and not some of the json highlighter plugins i had installed. 

    Please fix this asap, it's a huge pain, and causing much hassle. I have had to switch 1password to activate on 'click' which is a royal pain, but there's no other way of turning it off apparently.

    • rhukster's avatar
      rhukster
      New Contributor

      FYI, tried nightly 1Password release, no dice.. still a problem

  • BryceWray's avatar
    BryceWray
    New Contributor

    Seeing this also in a number of other sites (including my own). One example (not my own):

    https://mac.install.guide/terminal/path

    EDIT: Am also seeing the same occur with the 1Password extension in Safari on both macOS and iOS. Doesn't seem to affect Firefox (macOS, at least), interestingly.

    EDIT #2: The lack of the problem is Firefox is likely because of differing versions in the extensions themselves. While I have each browser's 1Password extension set to allow automatic updates, the one for Firefox is at only v.8.11.16.35 (October 28, 2025), while the one for Chrome is at v.8.11.22.27 (December 15, 2025); these versions appear to be the latest available for each browser. As for the Safari extension, it would seem to be v.8.11.22 from approximately one week ago (Apple's App Store shows only relative dates, such as "1w ago").

  • 1P_Blake's avatar
    1P_Blake
    Icon for Community Manager rankCommunity Manager

    Thanks for flagging this joeRinehart​! We've been able to reproduce this internally and the team is actively investigating the syntax highlighting issue and working on a fix.

  • solarizde's avatar
    solarizde
    Frequent Contributor

    Can confirm.  Anybody find a workaround? Is there a way to manually install an old extension version?  I need to disable it for now, working in confluence whole day and this is just a mess right now :(   No highlighting, linebreaks damages, escape sequences broken :(

  • wjoell's avatar
    wjoell
    New Contributor

    Same problem here with Fractl's HTML and View panels. Not only is the highlighting gone, but all whitespace is collapsed, which makes those views much harder to use. In Fractl, I can see a flash of highlighted, formatted code before it collapses into a long string.

    Not clear to me why a password manager extension is fiddling with code views to begin with. 1PW please fix this ASAP.

  • elbart's avatar
    elbart
    New Contributor

    We've also found a problematic display issue with the 1password browser extension in Chrome (and other Chromium based browsers like Brave). Please find the details below.

    Description of the issue

    When the 1password browser extension in the Chrome browser (or Brave) is installed and active, the font color of code snippets is almost invisible.

    Steps for Reproduction

    • Install the official 1password extension from the Chrome Webstore
    • Go to an example documentation page with code snippets: https://qdrant.tech/documentation/concepts/points/
    • Observe, that code snippets are almost unreadable, because the font color and the actual rendering of the snippet is very different. It seems the rendering doesn't take place.

    Expected behavior

    - The code snippets on the Qdrant Documentation are clearly visible with the right font color
    - Please find a screenshot of a Chrome browser with the 1password extension inactive

    Please let us know if and when this can be fixed within your Browser extension or how we can potentially mitigate this on our end.


    Thanks in advance!

    Tim

      • 1P_Blake's avatar
        1P_Blake
        Icon for Community Manager rankCommunity Manager

        That is correct 0xdf​! This issue is resolved in all currently available versions of the 1Password Extension.

    • tmandry's avatar
      tmandry
      New Contributor

      This issue causes code blocks in mdbook to be rendered incorrectly. Lines that are supposed to be hidden are visible, and syntax highlighting is disabled. Disabling the 1Password extension fixes the issue. First reported here:

      https://github.com/rust-lang/mdBook/issues/2994

      Sample page for testing:

      https://rust-lang.github.io/beyond-refs/reborrow/custom-mut.html

       

    • tmandry's avatar
      tmandry
      New Contributor

      This issue causes code blocks to be incorrectly rendered in mdbook. Lines that are supposed to be hidden are unhidden and syntax highlighting is lost. Disabling the extension fixes the issue. First reported here:

      https://github.com/rust-lang/mdBook/issues/2994

      Sample page for testing:

      https://rust-lang.github.io/beyond-refs/reborrow/custom-mut.html

       

  • takuyahara's avatar
    takuyahara
    Occasional Contributor

    I was looking https://shiki.style/guide/install , an NPM package which provides syntax highlighting and showing detail hovering on keywords. It is expected to be shown and work like this

    but is actually shown like this when using a beta or nightly browser extension. There's no issue on normal one.

    • OS: macOS 26.2 (25C56)
    • Browser: Brave v1.85.111