Unable to use lbrack; in Angular eventhough its a standard HTML - html

I was using the rbrack and lbrack in my Angular code yesterday and I found out that Angular throws an error on this.
Code:
<gen-pack-comp &lbrack;email&rbrack;="email""></gen-pack-comp>
Error:
Error in src/app/genesis/gen.pack.component.html (3:53)
Unknown entity lbrack
I saw the Named Character references and the rbrack or lbrack is a HTML standard U+0005B
So, I wanted to know why its not supported or am I doing something wrong in the syntax?
Version:
Angular CLI: 11.1.0
Node: 15.7.0
OS: Windows x64

You can use the hex or decimal (e.g. ] and ] for rbrack) representation of the entity. Angular uses it's own HTML parser for templates, and the team decided to only include most used entity names to keep the parser size reasonably small.
You can find related git issue here.

Related

API_ID error on x64 Telegram TDLIB (not x86)

I have a strange behaviour when working with the Telegram TDLIB. I've compiled TDLib for C++ Windows Library and have now the tdjson.dll for Win32 and Win64.
My app is using the WIN32 version without any problem, but when I try to set TdLib parameters on the Win64 via setTdlibParameters and JSON I get the following error:
{"#type":"error","code":400,"message":"Valid api_id must be provided. Can be obtained at https://my.telegram.org"}
I even use the same JSON string as used in the WIN32 version:
{"#type":"setTdlibParameters","parameters":{"database_directory":"C:\\tdlib","use_file_database":true,"use_chat_info_database":true,"use_message_database":true,"use_secret_chats":true,"api_id":123456789,"api_hash":"5485ed51254e12547ae5555555e555d0","system_language_code":"en","device_model":"Desktop","application_version":"0.1","enable_storage_optimizer":true}}
However, I always got the invalid API_ID error with WIN64. Why is the same JSON request not working with x64 DLL version?
Any help is much appreciated.
My question was answered here: https://github.com/tdlib/td/issues/2211
Starting from TDLib v1.8.6+ setTdlibParameters values must be inlined and i can see in your JSON examples you haven't inlined the parameters.
To inline setTdlibParameters values remove the key/array parameters. So your JSON will be like:
{
"#type":"setTdlibParameters",
"use_test_dc":false,
"database_directory":"",
"files_directory":"",
"database_encryption_key":"",
"use_file_database":false,
"use_chat_info_database":false,
"use_message_database":false,
"use_secret_chats":false,
"api_id":1245678,
"api_hash":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"system_language_code":"en",
"device_model":"Desktop",
"system_version":"",
"application_version":"0.1",
"enable_storage_optimizer":false,
"ignore_file_names":false
}
This should work fine in TDLib 1.8.6+.

Upgraded to angular 9.1 - error is Property 'supportsDOMEvents'

Here is the issue
error TS2416: Property 'supportsDOMEvents' in type 'ɵangular_packages_platform_browser_p
latform_browser_o' is not assignable to the same property in base type 'ɵDomAdapter'.
As #DrTeeth already mentioned, it's hard to help w/o any further infos.
But I've had a similar problem and want to share what had helped for me: This was a simple inconsistency of my dependencies. I', using a 3rd party Angular Component Library which was incompatible with the newer (Ivy-enabled) version, after I updated Angular itself. For me, the error message had some details about the package in question and after updating it, too, everything worked fine.

Migration issue Angular 8 to 9

I'm updating my angular project to use angular 9. In angular 8 I was using ng5-bootstrap-modal, but now I'm getting error:
ERROR in node_modules/ng5-bootstrap-modal/dist/bootstrap-modal.module.d.ts:4:22
error NG6002: Appears in the NgModule.imports of SharedModule, but could not be resolved to an NgModule class.
This likely means that the library (ng5-bootstrap-modal) which
declares BootstrapModalModule has not been processed correctly by
ngcc, or is not compatible with Angular Ivy. Check if a newer version
of the library is available, and update if so. Also consider checking
with the library's authors to see if the library is expected to be
compatible with Ivy.
Did anyone face the same issue?

Cakephp 3.1 have issues with PHP7.2

I have develop my web application by using cakephp 3.1. My service provider has update the php version to 7.2. Now my application is not work well, as it was working with PHP5.6, Its showing different warnings with debug=true; and the big problem is its not showing line which have some problem, if some is there. Here is warning message.
Warning: count() [function.count]: Parameter must be an array or an object that implements Countable in D:\xampp7\htdocs\bighris\vendor\cakephp\cakephp\src\Database\QueryCompiler.php on line 115
In case some errors are there its not showing it, in the following way, there I can't find the line number and the file which have the problem.
https://www.screencast.com/t/qIQB1YIW
Please help me to solve the issue, Thanks
As per the Cakephp github issues:
PHP 7.2 has changed count's behavior
that's why you are getting errors.
PHP 7.2 has changed count's behavior causing problems with QueryCompiler
You can follow the below link or change your PHP version to 7.1 or less to resolve this issue.
Stop warnings when using count in QueryCompiler in PHP 7.2
it looks like you are passing some wrong data to count function, guess you are passing some query directly to count. Or something like that.
If you may show the code of the controller you are facing issue it may be a great help.
there is solution for you....
2020-09-30 06:22:30 Warning: Warning (2): count() [function.count]: Parameter must be an array or an object that implements Countable in [D:\xampp\htdocs\gym_master\vendor\cakephp\cakephp\src\Database\QueryCompiler.php, line 126]
please check your php version...

Is there a way to force the UWP RichEditBox use only UTF encoding when the user types?

I am trying to convert the contents of a UWP RichEditBox to HTML.
For that purpose, I've tried using the RtfPipe library (https://github.com/erdomke/RtfPipe). From the looks of it, this library has a problem on UWP, due to the fact that not all encodings are defined on that target framework. (This is the error you get, if you are interested: Encoding.GetEncoding can't work in UWP app, but the accepted answer seems not to be the best option on all platforms - I haven't even managed to make the suggested fix compile, so it might not be valid anymore)
Now, as a way of avoiding this from happening, I am wondering whether there is a way to force the control to always use one of the UWP-defined UTF-variants for encoding the data when the user types his text.
Because, now, when I type into it, I get things like that:
{\rtf1\fbidis\ansi\ansicpg1253\deff0\nouicompat\deflang1032{
....
\pard\tx720\cf1\f0\fs23\lang1033
...that make the library throw exceptions.
I guess, if I manage to make it not use ASCII code pages, things will be great.
After taking a look at the control properties though, I do not see something I could use. Is there any way to achieve this?
This is the error you get, if you are interested: Encoding.GetEncoding can't work in UWP app
As you described, there is an inner error thrown when using this package with UWP app. System.ArgumentException: 'Windows-1252' is not a supported encoding name, by testing on my side, which is thrown by the code line public static readonly Encoding AnsiEncoding = Encoding.GetEncoding("Windows-1252"); of RtfSpec.cs when UpdateEncoding.
It seems like Windows-1252 may not be supported in UWP from the error details,also see this similar thread. You could use UTF instead as you want, for example, have a change on the library with following then it will work (testing demo here).
public static readonly Encoding AnsiEncoding = Encoding.UTF8;
I haven't even managed to make the suggested fix compile, so it might not be valid anymore
Encoding.RegisterProvider method should be work, but it only support UWP or .NET Framework 4.6, it does't support the Portable Class Library. The RtfPipe library you mentioned is Portable Class Library, so that you cannot use Encoding.RegisterProvider. Encoding.GetEncoding method supports Portable Class Library, details please check the version information of the two classed.
I guess, if I manage to make it not use ASCII code pages
RTF itself uses the ANSI, PC-8, Macintosh, or IBM PC character set to control the representation and formatting of a document, you may not able to change that. Consider to update the library to resolve the issue for UWP.