|
1 | 1 | # Changelog
|
2 | 2 |
|
| 3 | +## fluent-react 0.7.0 (May 18, 2018) |
| 4 | + |
| 5 | + - Protect void elements against translated text content. (#174) |
| 6 | + |
| 7 | + Text content found in the translated markup is now ignored when the |
| 8 | + element passed as a prop to `<Localized>` is a known void element. This |
| 9 | + prevents the _element is a void element tag and must neither have |
| 10 | + children nor use dangerouslySetInnerHTML_ error in React. |
| 11 | + |
| 12 | + For instance, `<input>` is a known void element and it must not have the |
| 13 | + text content set by the buggy translation in the following example: |
| 14 | + |
| 15 | + ```jsx |
| 16 | + <Localized id="hello" text-input={<input type="text" />}> |
| 17 | + <div /> |
| 18 | + </Localized> |
| 19 | + ``` |
| 20 | + |
| 21 | + ```properties |
| 22 | + hello = Hello, <text-input>invalid text content</text-input>. |
| 23 | + ``` |
| 24 | + |
| 25 | + Due to this change some build setups might now require the |
| 26 | + `@babel/plugin-proposal-object-rest-spread` or the |
| 27 | + `@babel/plugin-syntax-object-rest-spread` plugin. |
| 28 | + |
| 29 | + - Support HTML entities in translations. (#183) |
| 30 | + |
| 31 | + Translations with HTML entities will now trigger the markup sanitization |
| 32 | + logic and will be consequently parsed into the characters they represent. |
| 33 | + |
| 34 | + - Re-render `withLocalization`-components on l10n changes. (#196) |
| 35 | + |
| 36 | + Components enhanced by the `withLocalization` are now re-rendered when |
| 37 | + the enclosing `<LocalizationProvider>` receives a new value of the |
| 38 | + `messages` prop. |
| 39 | + |
| 40 | + - Use compat dependencies only in fluent-react/compat. (#193) |
| 41 | + |
| 42 | + When `fluent-react` is imported as `fluent-react` it will now use the |
| 43 | + untranspiled version of its `fluent` dependency for consistency. When |
| 44 | + it's imported as `fluent-react/compat` it will use `fluent/compat` too. |
| 45 | +
|
| 46 | + Due to this change some build setups might now require the |
| 47 | + `@babel/plugin-proposal-async-generator-functions` or the |
| 48 | + `@babel/plugin-syntax-async-generators` plugin. |
| 49 | +
|
| 50 | + - Upgrade to Babel 7. (#126) |
| 51 | +
|
| 52 | + `fluent-react/compat` is now built with Babel 7. |
| 53 | +
|
3 | 54 | ## fluent-react 0.6.1 (February 19, 2018)
|
4 | 55 |
|
5 | 56 | - Preserve children of wrapped components if translation value is null. (#154)
|
|
0 commit comments